Git Product home page Git Product logo

ci's People

Contributors

czyzm avatar evabishchevich avatar jareksl avatar larryonoff avatar mlesnicrockwell avatar obastemur avatar thalitester avatar vjrantal avatar yaronyg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

czyzm jareksl paeony

ci's Issues

Log is not posted if CI build result is a timeout

Example at https://github.com/ThaliTester/TestResults/blob/5809977105d9cee_Run_coordinated_desktop_tests_in_CI_vjrantal/build.md and can be reproduced by having a build that takes over the timeout (currently 30 minutes).

Clearly, builds should not take more than 30 minutes, but if something is broken with the script, this may happen and if so, having logs would help debugging the root cause (in the example posted above, the root cause is known).

Enhance timeout handling for running tests

There are several items to be done within android.js test runner:

  1. Extend timeout for checking if device is ready (after reboot) since for some devices 45s is not enough.
  2. When timeout for running all tests occurs but some devices didn't manage to put anything into logArray, the logArray is missing entry for the device and as a result timeout handling fails with exception. We need to ensure that proper entry exists for each device in logArray.
  3. When running instrumentation tests and timeout occurs the tests are stopped and you can see that in logs but the general outcome from such run is "Tests passed successsfully". We need to handle this case.

WIFI connection to Accesspoint is unreliable with Android devices

Basing on the test results: https://raw.githubusercontent.com/ThaliTester/TestResults/48600797ce001f3_Story_001_juksilve_DrJukka/test_log.md

Each device sets Wifi & Bluetooth on successfully in the beginning. this can be verified by following log lines
"Turning radios to true
toggleBluetooth -
toggleWiFi"

Then from the logs it can be seen that following devices:

  • samsung-SM-T232: (DEV6226)
  • HUAWEI-ALE-L21: (DEV5429)

Are never assigned IP address other than local host, indicating that they are not having connection to the Access point, even when the Wifi has been successfully turned on.

As a second issue, from logs it can also be seen that some devices do lose the connectivity in the middle of the test. Following two devices are illustrating this:

  • HTC-HTC Desire 820:(DEV3229)
  • HTC-HTC One_M8: (DEV2969)

As it can be seen that they do have sonnectivity in the start, but then on some point middle of the run they start re-reporting connection error, and on that point they are only reporting to have the IP address for local host, indicating disconnection from the AP.

In general this test was better than average, most often the successful connections are well less than 20, and this time it was 22 out of 25 in beginning.

The missing device which did not make it to teh test was LGE-Nexus 5: (DEV2582), which for some reaso had really slow start and was connecting to the coordinator server late.

Upgrade to latest adb

For marshmallow, we would need adb that supports the -g switch to grant all runtime permissions.

Review adb commands for failure cases

In android.js there are several places where adb command is issued and it is considered an error case only if the exit code of adb is non-zero. However, that is often not the case, for example:

$ adb -s VS986da9f36ea install ~/Desktop/android_0_625481247756efd.apk 
2953 KB/s (47606904 bytes in 15.741s)
    pkg: /data/local/tmp/android_0_625481247756efd.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
$ echo $?
0

In above, adb install fails, because the signature in the .apk is different than what is installed on the device. This is as expected, but the as seen above, the exit code is 0.

The failure conditions probably require additional checks to ensure commands worked as expected. For example, when installing an app, it might be required to issue something like shell pm list packages | grep <package-name> and make sure the app actually got installed to the device and fail if not.

Set up Sinopia & Node 6 in CI

  • Set up Sinopia
  • Install Node 6 and latest NPM
  • Update the VM image after calling add user

For PR 811 to ever pass we have to have Sinopia set up. Please look here for instructions on how to do it. The key thing is that once you have run add user you have to take a snapshot of the VM and set up that snapshot to run in the future so we will be able to talk to the Sinopia instance.

As we discussed Sinopia should be run outside of the VM so we can persist information across VM re-runs.

Also we need to add Node 6 and NPM to the VM image so we can do our custom builds of PouchDB and Express-PouchDB.

CI exited to an issue with killing some iOS tasks

Build finished
IS Args: /Users/thali/Github/CI/builder/builds/server_62548124bf1e918 [email protected]:~/Test/server_62548124bf1e918/test/TestServer/
Report server

/Users/thali/Github/CI/tasker/taskman.js:122
            iosChild.kill();
                    ^
TypeError: Cannot read property 'kill' of undefined
    at /Users/thali/Github/CI/tasker/taskman.js:122:21
    at ChildProcess.exithandler (child_process.js:669:1)
    at ChildProcess.emit (events.js:85:9)
    at maybeClose (child_process.js:773:12)
    at Socket.<anonymous> (child_process.js:994:1)
    at Socket.emit (events.js:82:9)
    at Pipe.close (net.js:422:6)

Make CI update itself

If we update the CI project we need the CI framework to detect this and then update itself on the next run.

CI doesn't build per commit, but per branch.

If I have a PR from a branch to which I push two commits fairly close to each other, CI is triggered twice (which is expected), but ends up building using the most recent commit, because it does the checkout based on the branch and not based on the commit sha1.

This might be seen as an unexpected behavior when afterwards looking at the logs since the logs are posted as if the test run was made using a certain commit sha1, which isn't the one CI actually used.

Is CI able to output logging from Java?

In looking through the logs I don't see any logs from our Java code, only jxcore-log. If we are building as a release build then generally Android suppresses logs. Which is bad because we need to see those logs!

Make sure CI's router isn't allowing the iOS devices to talk to each other over the local WiFi

We have a new router in CI and we need to make sure that it is configured so that the iOS devices can get to the coordination server (which btw has an Internet routable address) but can't get to any of the other iOS devices over the local wifi or this will invalidate our MPCF testing as we will be testing over normal wifi and not using the P2P radio features.

Please also update the CI README to point out the need for this and explain how we did it with what ever router we are currently using.

Have Marshmallow devices in the device pool

For Marshmallow devices to work, the CI code needs to be updated to issue a command like:

adb shell pm grant <package name> android.permission.ACCESS_COARSE_LOCATION

after the app is installed.

Proposal is that since node thali09 is currently used for offline testing, that node would also be used to test this code change and eventually have 2 Marshmallow devices plugged into it and then the node could be enabled back in CI configuration.

CI is incorrectly returning success when it should be returning failure

I got the following message via Email from CI:

Test 79426650eeb77ae(eeb77ae) has successfully finished without an error
See https://github.com/ThaliTester/TestResults/tree/79426650eeb77ae_Almost_to_the_top_of_the_Thali_stack_yaronyg/ for the logs

Which was both exciting and of course mystifying since it shouldn't be working. In fact when I groveled through the logs I saw that we are failing on 'Cannot find module '../thalilogger' but I'll file a separate bug on that.

This bug is - why the heck did I get a mail saying the tests passed when they didn't?

install.js is a beast, it has to be refactored

install.js is a critical piece of code. It is the first thing that anyone using Thali ends up calling and it controls if their initial experience will be good or bad. It is also doing a lot of very complex stuff that will continue to evolve over time. We desperately need it to be less of a hacky mess.

Support for longer CI runs.

Currently, the maximum timeout we can set in mobile_test.json is effectively 30 minutes so that there is enough time to post all logs after the hard-coded "master-timeout" in the CI is reached.

In the future, we probably want to sometimes (e.g., nightly) run longer stress tests that last, for example, 2-3 hours. To support this kind of scenarios, it would be good if there wasn't a hard-coded "master-timeout" in CI, but rather the internal logic would be so that there would be enough to time to do log gathering after the timeout value set in mobile_test.json is reached.

CI doesn't seem to test the merged content with PRs

When doing a PR, an important aspect to verify is how the new code works together with the base branch it targets. Here is a quote from Travis docs how they explain is:

Rather than test the commits from the branches the pull request is sent from, we test the merge between the origin and the upstream branch.

Currently, it seems like the CI system tests the code from the branch the pull request is from and not the merged content.

@yaronyg: Can you confirm how we would like this to work?

@obastemur: Please correct me if I had misunderstood the current CI behavior.

CI appears to be running an old version of JXcore

When our tests run in CI I am getting the error:

Missing PFX or certificate + private key.

I believe this error is from an old version of Shawn's build of JXcore before he fixed the need to put in a PFX cert even when you were using PSK. So we need to update the version of JXcore in CI to the latest so we don't see this error.

Handle unauthorized Android devices

Devices may sometimes be unauthorized for adb access:

pi@thali05 ~ $ adb devices
List of devices attached 
LGH8153b36be34    unauthorized

Currently android.js has code like:

  if (res[0].indexOf("List of devices") == 0) {
    for (var i = 1; i < res.length; i++) {
      if (res[i].trim().length == 0) continue;
      if (res[i].indexOf('offline') > 0) {
        logme("Warning: Phone " + res[i] + " OFFLINE");
        continue; // phone offline
      }
      var dev = res[i].split('\t');

This code should be updated to also take into account the unauthorized case.

Android logcat logs not available from all devices

As an example, see https://raw.githubusercontent.com/ThaliTester/TestResults/486007970c43223_Story_001_juksilve_DrJukka/test_log.md where there is 21 Android devices participating to the test.

On app startup, this line is printed to the jxcore log:
Initializing JXcore engine

Above line is found from the linked test results page 13 times, which indicates the the logcat output was available for 13/21 devices.

As a side note, the coordination server indicates that at least 19 devices were able to connect to it so at least 19 devices have been able to successfully start the app and thus at least 19 logcat outputs should be available.

Bring new Android devices online

We have a bunch of new devices that we have taken off line because of various bugs that are fixed or soon will be but until we get Android stood up and working on the existing devices we don't want to introduce new ones. So we'll schedule this work item in a sprint once we are ready to take the new devices.

CI sometimes posts wrong log files

I run a test at thaliproject/Thali_CordovaPlugin#340 (comment) but when I followed the results link, some devices seems to have log results from some previous runs.

For example, open https://github.com/ThaliTester/TestResults/blob/51074821f72e61a_Enable_native_layer_and_replication_tests__vjrantal/thali07_samsung-SM-A500FU.md and search for string:

execPath /data/data/com.example.hello/files/www/jxcore

The reason why this line is suspicious is that the package name of the app under this test is not com.example.hello but should be com.test.thalitest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.