summaryrefslogtreecommitdiff
path: root/test/default_run.py
AgeCommit message (Collapse)Author
2025-03-21Run-test: Remove sanitize_dex2oat_cmdline David Srbecky
Test: ./art/test.py -r --host --target --optimizing --64 Change-Id: Ic4b28b6cf5414d0a88c10a175b84255a0d78ea6c
2025-03-20Run-test: Remove intermediate files from the build output. David Srbecky
This removes 90%+ of files in the data for run-tests, which is needed to build but not to execute the tests. (original source code and java-bytecode class files) Trade-fed has its own implementation of 'adb push', which is very slow, so the extra files considerably slowed everything down. Test: ./art/test.py -r --jvm --host --target --optimizing --64 Change-Id: Ie4da1b9c9e94f0d265fdb384948a073593983ac5
2025-01-20Introduce an "external" variant of libarttest(d).so and use it to fix Martin Stjernholm
and re-enable 817-hiddenapi. 817-hiddenapi and some other run tests have been disabled on target since https://r.android.com/1689792. A problem has been that (at least some of) those tests depended on libarttest(d).so being in java.library.path, so that the .so could be e.g. found and copied from there by the test. That's not possible to get to work with libarttest(d).so, since we have to "register" it with NATIVELOADER_DEFAULT_NAMESPACE_LIBS before dalvikvm starts. Instead introduce a new test library libarttest(d)_external.so that takes the place libarttest(d) had before https://r.android.com/1689792. I.e. it gets installed in /data/nativetest(64)/art/<arch>, which is present on java.library.path. It will be loaded in the test's classloader namespace rather than com_android_art, so it cannot access ART internals. However, it can access symbols in libarttest(d).so, so it's possible to export an (unstable) API there that the "external" library can call across the linker namespace boundary. Use this approach to fix 817-hiddenapi, and re-enable it again. Note: Since libarttest(d)_external doesn't have direct access to ART internal it ought not need to be split into -d and non-d variants. The only reason that's still the case is that its variants need to depend on the corresponding variants of libarttest(d). Test: art/test/testrunner/testrunner.py --target --64 817 in armv8 target chroot Test: art/test/testrunner/testrunner.py --host 817 Bug: 186654484 Change-Id: I13c186e8d086d07c2480e96a1c1f85651dac7d84
2024-11-22Increase timeout (give extra 60 min) for tests on QEMU. Ulya Trofimovich
Test: launched custom LUCI build as: led get-builder art/ci/qemu.riscv.64 \ | led edit-gerrit-cl https://android-review.googlesource.com/c/platform/art/+/3364946 \ | led launch Change-Id: I517ee0528c385cca8d1e65aee760286477897bd7
2024-11-15run-test: Create boot-image-compilation script David Srbecky
Add script which compiles the boot image to the run-test zip file. Also add json file with all the test rules. Each rule can adb-push data from the zip file, and adb-shell execute any pushed bash script. The boot-image compilation is just another rule, and the other rules have a dependency on it. Therefore it will execute first and only once. Test: Install ART test APEX on device and manually perform the commands Change-Id: I70bad11b11f81a427bf16eecd773dc10c34ff664
2024-11-14Export ART_TEST_ON_VM for tests. Ulya Trofimovich
This is needed to query ART_TEST_ON_VM from libnativehelper, so that we can run ART tests in debug mode. Test: run ART test 1924 in debug mode (previously it used to fail with `globals_unix.cc:59 Loading libartbased.so while libartbase.so is already loaded`, now it pesses): export SOONG_ALLOW_MISSING_DEPENDENCIES=true export ART_TEST_SSH_USER=ubuntu export ART_TEST_SSH_HOST=localhost export ART_TEST_SSH_PORT=10001 export ART_TEST_ON_VM=true . ./build/envsetup.sh lunch armv8-trunk_staging-eng art/tools/buildbot-build.sh --target -j72 #--installclean . art/tools/buildbot-utils.sh art/tools/buildbot-cleanup-device.sh art/tools/buildbot-setup-device.sh art/tools/buildbot-sync.sh art/test/run-test --chroot $ART_TEST_CHROOT --64 1924 Change-Id: I1a8adf92984e50c62ab0741283a112c724efa97b
2024-08-29Disable metrics reporting to StatsD in chroot tests Stefano Cianciulli
Bug: 362800305 Test: chroot tests Change-Id: I86614a44ca0546ac3818df4b6c0479e1ac381148
2024-07-09Increase dex2oat timeout for VM tests. Ulya Trofimovich
Some checker tests are slow and have been regularly failing on LUCI with dex2oat timeout, allow them more time to finish. Test: Ran VM tests on LUCI with this patch (using led). Bug: 283085397 Change-Id: I0e77858f3c407e8db4a17d84050cf2c68396cfad
2024-07-08Redirect dex2oat logs to stderr for VM tests. Ulya Trafimovich
VM environment is somewhere in-between host and target: we consider VM a target device use the target builds for it, but it's Linux rather than Android, so it has no logcat / tombstoned, and all the logs must go to stderr, or else they are lost. This patch redirects dex2oat logs to stderr (dalvikvm logs were already redirected). Test: Ran VM tests on LUCI with this patch (using led), observed dex2oat logs on stderr (some tests are currently failing). Bug: 283085397 Change-Id: I37ae66feb8a8d51aef3abb908affd15bbf7ede23
2024-06-12Remove compact dex level plumbing from the test scripts and the tests Martin Stjernholm
themselves. dex2oat ignores --compact-dex-level since https://r.android.com/2736873. Test: presubmits Bug: 325430813 Change-Id: Ife6002aae2581613bd3f2a9a11a8f30bdf27fa4b
2023-09-21Clean up linux bionic and zipapex test support. Martin Stjernholm
They were only needed for the host APEX, which has been removed. Test: art/tools/buildbot-build.sh --host art/test/testrunner/testrunner.py --host --64 Bug: 279835185 Change-Id: I86bee85ce3d5eeba2a031cedc2d1ea5768a77f2d
2023-09-06Run-test: Fix host log regexp David Srbecky
If the PID is small enough there can be extra white-space. Test: Run "./art/test.py -r --host" in a loop for a while Change-Id: Ie826ea317ff9b18a86c3317009ae752c2317c2c1
2023-07-03Change the meaning of --interpreter option in testing scripts. Ulya Trafimovich
Previously --interpreter used to run the tests on the slow C++ switch-interpreter (the analogue of -Xint option to dalvikvm). Now it runs the tests on the fast assembly interpreter, Nterp (the analogue of -Xusefit:false option to dalvikvm). --interp-ac can stil be used to run tests on the switch interpreter. Bug: 271573990 Test: `art/test.py --host -r 001-HelloWorld` with the following modifications that ensure ART runs in the intended mode: - no modifications: 10/10 tests pass - deliberaly break Nterp: 2/10 tests pass (only --interp-ac ones) - deliberately break JIT: 8/10 tests pass (only --jit tests fail) Change-Id: If2ec1df96b65c7e2dd7e81dff3ee0378bde62751
2023-06-29Fix host logcat parsing after latest changes. Nicolas Geoffray
The output has changed with: https://android-review.git.corp.google.com/q/topic:%22log_format%22 Test: test.py Bug: 287910948 Change-Id: I61a8ed63b0c0ff7dd297bb1a2fa1e96ed36502b0
2023-06-07Add $ANDROID_BUILD_TOP to GDB source search paths Ruben Ayrapetyan
Without this change, GDB doesn't display the sources e.g. upon the `list` command or when run with `--tui` option. Test: art/test.py -v -j56 --host --64 --optimizing \ --ndebuggable --gdb -t 071-dexfile-map-clean \ --run-test Test: art/test.py -v -j56 --host --64 --optimizing \ --ndebuggable --gdb-dex2oat -t 071-dexfile-map-clean \ --run-test Change-Id: If7e43f3d0515333e5e9713f56cd62960e7e9a0c6
2023-06-07Switch --gdb-dex2oat to GDB Ruben Ayrapetyan
This also fixes the issue with the "--" part erroneously being added to GDB_DEX2OAT_ARGS twice for the secondary compilation - via renaming GDB_DEX2OAT_ARGS -> GDB_DEX2OAT_EXTRA_ARGS and introducing GDB_DEX2OAT_ARGS local variable with value constructed independently of previous write_dex2oat_cmdlines invocations. To avoid ambiguity on whether the extra arguments are for gdb or for dex2oat, move them to an earlier position on the command line. Also, fix handling of dash symbols in the extra arguments. Test: art/test.py -v -j56 --host --64 --optimizing --ndebug \ --ndebuggable --gdb-dex2oat -t 071-dexfile-map-clean \ --run-test Test: art/test.py -v -j56 --host --64 --optimizing \ --ndebuggable --gdb-dex2oat -t 071-dexfile-map-clean \ --run-test Test: art/test.py -v -j56 --host --64 --optimizing \ --ndebuggable --gdb-dex2oat --gdb-dex2oat-args='--version' \ -t 071-dexfile-map-clean --run-test Test: art/test.py -v -j56 --host --64 --optimizing \ --ndebuggable --gdb-dex2oat --gdb-dex2oat-args='--tui' \ -t 071-dexfile-map-clean --run-test Test: art/test.py -v -j56 --host --64 --optimizing \ --ndebuggable --gdb-dex2oat --gdb-dex2oat-args='-ex=run;--tui' \ -t 071-dexfile-map-clean --run-test Change-Id: I598be3c3009947fea2fd6f45fa3a94a54a3c3d9e
2023-03-21Remove uses of the extract compiler filter. Nicolas Geoffray
Access checks tests don't need extract, they already pass -Xverify:softfail. Test: test.py Bug: 237380287 Change-Id: I7793a84e162d61f77c763af28fbeb58468cbc826
2023-01-30Add support for running ART tests on a Linux virtual machine. Ulya Trafimovich
Test: setup a local VM and run ART tests on it: lunch aosp_arm64-userdebug export ART_TEST_SSH_USER=ubuntu export ART_TEST_SSH_HOST=localhost export ART_TEST_SSH_PORT=10001 export ART_TEST_ON_VM=true . art/tools/buildbot-utils.sh art/tools/buildbot-build.sh --target # Create, boot and configure the VM. art/tools/buildbot-vm.sh create art/tools/buildbot-vm.sh boot art/tools/buildbot-vm.sh setup-ssh # password: 'ubuntu' art/tools/buildbot-cleanup-device.sh art/tools/buildbot-setup-device.sh art/tools/buildbot-sync.sh art/test.py --target -r 001-HelloWorld art/tools/run-gtests.sh Test: check that non-VM testing still works: lunch aosp_arm32-userdebug . art/tools/buildbot-utils.sh art/tools/buildbot-build.sh --target export ART_TEST_CHROOT=/data/local/art-test-chroot art/tools/buildbot-cleanup-device.sh art/tools/buildbot-setup-device.sh art/tools/buildbot-sync.sh art/test.py --target -r --32 001-HelloWorld Change-Id: I1393f8132b0b5d6ad10e291504550a5e7751f8e2
2022-12-12Run tests: Re-enable signal_dumper on target David Srbecky
I have previously (3 years ago) disabled it during gcstress investigation to let it propagate to testrunner.py (which should be sufficient on its own). However, we have seen recent runs where that somehow didn't work. Re-enable the singal_dummper on target again to add the second level of protection. This will also be necessary for trade-fed, since it will not run in testrunner.py. Test: "/art/test.py -r --optimizing --64" with low timeout Change-Id: Ic03785599d1a8bf90d6f89f1ad650fbc59fcdf6e
2022-12-07Try to fix art-linux-bionic-zipapex David Srbecky
Use more robust version of `ln` command. Some tests will run themselves twice and thus run `ln` twice, which results in creating link inside the link (it should be harmless, but it somehow seems to cause an error sometimes). I was unable to reproduce the error locally. Use -T with `ln` to make it explicit the second argument is the destination, not a directory of the destination. I believe this should potentially help. Test: run_build_test_target.py art-linux-bionic-x64-zipapex Change-Id: I2c263d9fa17702b545732a446ff00ff128ffc413
2022-12-05Run test: Execute scripts via runner bash script. David Srbecky
Simplify all run tests to simple execution pattern: adb push <inputs> && adb shell <runner> && adb pull <outputs> This dramatically reduces the number of adb commands, and it will make it trivial to reimplement the above steps in tradefed. Follow the above logic for host and jvm as well for consistency. Test: ./art/test.py -r --all-target --optimizing --64 Change-Id: I4b54a4d32195c440ca43133bbbe988ae24e626af
2022-11-25Run test: Remove use of 'get-device-isa' (part 1) David Srbecky
Get the ISA from build configuration rather than investigating the attached device. As the first step, assert that those two match. Test: ./art/test.py -b -r --optimizing --32 001-HelloWorld Test: ./art/test.py -b -r --optimizing --64 001-HelloWorld Change-Id: I74e750666f427e741be417e755bd11ad65e32a99
2022-11-24Run test: Do output post-processing on device. David Srbecky
Run the various 'sed' commands on device. Also move the adb push/pull commands from default_run.py (which may be executed several times for multi-pass tests) to run-test (which is executed just once). This is a step towards being able to create runner bash file, so that all tests are executed using the same common pattern: adb push <inputs>; adb shell sh <runner>; adb pull <outputs> Test: ./art/test.py -b -r --optimizing --64 Change-Id: I4e1862ab4dc853175ec85c712e452420e91bc6b7
2022-11-21Run test: Remove on-device signal_dumper detection David Srbecky
The ART APEX is already first on the $PATH and should always exist. Just let the usual path lookup logic find the signal_dumper binary. Test: ./art/test.py -b -r --optimizing --64 001-HelloWorld Change-Id: Id54750bc1d3ca9d6ba74dad69fab1459ec4b39a5
2022-11-21Run test: Disable color output on LUCI David Srbecky
Test: Colors still work locally Change-Id: I9452de8a6c6274462520f42ce4ddec1449e30696
2022-11-17Run test run: Reduce verbosity David Srbecky
All commands are printed to terminal for failing tests. Reduce the number of commands printed. In particular, 'echo' which was used only for debugging. Test: Observe terminal output for failing test Change-Id: Ief4f95363e4463b1234b743ef623f25d49d6c3f1
2022-11-16Run test run: Filter interleaved log lines. David Srbecky
Different threads can print to stderr, causing interleaved output. Test: art/test.py -b -r --host Change-Id: Iad9b96409e7c283569866bae67235d69f9a33ad3
2022-11-15Fix art-interpreter-no-image David Srbecky
Add regex for the expected error message. Test: ./art/test/testrunner/run_build_test_target.py -j80 art-interpreter-no-image Change-Id: I5d65afbca4e5ace5cb44d469498c450c37a4380f
2022-11-14Run test: Increase runner verbosity David Srbecky
Print stdout and stderr of all processes by default. Remove the --verbose flag since that is the default behavior now. Use ANDROID_LOG_TAGS=*:i by default, print all output to terminal, but automatically filter it before we use it for stderr diffing. Replace the --external-log-tags flag with --android-log-tags=*:v which allows setting the log verbosity in one step. Add --diff-min-log-tag which allows the tests to specify which logs should be considered in stdout/stderr diffing (defaults to *:E). Test: test.py -b -r --optimizing --64 --all-target Test: test.py -b -r --host --run-test-option=--android-log-tags=*:v Change-Id: Id70e68217a4b77e2764f517e775a07293fe99dcd
2022-11-10Reland "Run-test: Refactor stdout/stderr capture" David Srbecky
Test: ./art/test.py -r --optimizing --64 --all-target Change-Id: Iae5e26f7e1e084ef88b1f24ed7f8defcd878453a
2022-11-09Revert "Run-test: Refactor stdout/stderr capture" David Srbecky
This reverts commit b34672426f067db0b9fa48f9d6f276d8f7c31219. Reason for revert: This sometimes hides stdout/stderr. Change-Id: Id6d8785b5d231dd4c6d6bfa385b8447688f95e5a
2022-11-03Run-test: Refactor stdout/stderr capture David Srbecky
Capture only the stdout/stderr of the dalvikvm command. This allows us to echo debugging commands within `adb shell`. This change will be necessary for the runners scripts as well. Test: ./art/test.py -r --all-target --optimizing --64 Change-Id: Ic0cd0baac5238f220323fd0a930f58164591119f
2022-11-03Move test/etc/default_run.py one directory up. David Srbecky
Also merge in the single use of apex_bootclasspath_utils. This removes the awkwardly named etc/ directory. Test: test.py -b -r --all-target --optimizing --64 Change-Id: I79a752cb3c2da4d50a6fc4c26e58056dc9224d0c