Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -ex |
| 4 | |
Tomeu Vizoso | 92f3c51 | 2020-03-24 12:58:30 +0100 | [diff] [blame] | 5 | INSTALL="$(pwd)/install" |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 6 | |
| 7 | # Set up the driver environment. |
Rohan Garg | 90a39af | 2020-02-28 13:48:53 +0100 | [diff] [blame] | 8 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/install/lib/" |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 9 | |
| 10 | # Set environment for renderdoc libraries. |
| 11 | export PYTHONPATH="$PYTHONPATH:/renderdoc/build/lib" |
| 12 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/renderdoc/build/lib" |
| 13 | |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 14 | # Set environment for the waffle library. |
| 15 | export LD_LIBRARY_PATH="/waffle/build/lib:$LD_LIBRARY_PATH" |
| 16 | |
| 17 | # Set environment for apitrace executable. |
Andres Gomez | 1ca9168 | 2020-04-02 22:38:34 +0300 | [diff] [blame] | 18 | export PATH="/apitrace/build:$PATH" |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 19 | |
Rohan Garg | 7406d62 | 2020-01-28 15:19:53 +0100 | [diff] [blame] | 20 | # Set environment for wflinfo executable. |
| 21 | export PATH="/waffle/build/bin:$PATH" |
| 22 | |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 23 | # Use the surfaceless EGL platform. |
Andres Gomez | 1ca9168 | 2020-04-02 22:38:34 +0300 | [diff] [blame] | 24 | export EGL_PLATFORM="surfaceless" |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 25 | export DISPLAY= |
Andres Gomez | 1ca9168 | 2020-04-02 22:38:34 +0300 | [diff] [blame] | 26 | export WAFFLE_PLATFORM="surfaceless_egl" |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 27 | |
Eric Anholt | b5f727a | 2020-06-24 10:47:37 -0700 | [diff] [blame] | 28 | # Our rootfs may not have "less", which apitrace uses during apitrace dump |
| 29 | export PAGER=cat |
| 30 | |
Tomeu Vizoso | 8cba1a1 | 2020-04-21 15:44:03 +0200 | [diff] [blame] | 31 | RESULTS=`pwd`/results |
| 32 | mkdir -p $RESULTS |
| 33 | |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 34 | # Perform a self-test to ensure tracie is working properly. |
Eric Anholt | b88c46f | 2020-06-08 14:51:59 -0700 | [diff] [blame] | 35 | if [ -z "$TRACIE_NO_UNIT_TESTS" ]; then |
Alexandros Frantzis | dd47192 | 2020-09-03 14:22:40 +0300 | [diff] [blame] | 36 | python3 -m pytest -v --pyargs $INSTALL/tracie/tests/test.py |
Eric Anholt | b88c46f | 2020-06-08 14:51:59 -0700 | [diff] [blame] | 37 | fi |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 38 | |
Tomeu Vizoso | 8cba1a1 | 2020-04-21 15:44:03 +0200 | [diff] [blame] | 39 | if [ "$GALLIUM_DRIVER" = "virpipe" ]; then |
| 40 | # tracie is to use virpipe, and virgl_test_server llvmpipe |
| 41 | export GALLIUM_DRIVER="$GALLIUM_DRIVER" |
| 42 | |
| 43 | GALLIUM_DRIVER=llvmpipe \ |
| 44 | GALLIVM_PERF="nopt,no_filter_hacks" \ |
| 45 | VTEST_USE_EGL_SURFACELESS=1 \ |
| 46 | VTEST_USE_GLES=1 \ |
| 47 | virgl_test_server >$RESULTS/vtest-log.txt 2>&1 & |
| 48 | |
| 49 | sleep 1 |
| 50 | fi |
| 51 | |
Alexandros Frantzis | 4c6ce82 | 2020-04-09 18:40:38 +0300 | [diff] [blame] | 52 | # Sanity check to ensure that our environment is sufficient to make our tests |
| 53 | # run against the Mesa built by CI, rather than any installed distro version. |
| 54 | MESA_VERSION=$(cat "$INSTALL/VERSION" | sed 's/\./\\./g') |
| 55 | wflinfo --platform surfaceless_egl --api gles2 | grep "Mesa $MESA_VERSION\(\s\|$\)" |
| 56 | |
Tomeu Vizoso | 7d5f4d3 | 2020-08-05 10:17:26 +0200 | [diff] [blame] | 57 | python3 "$INSTALL/tracie/tracie.py" --file "$INSTALL/traces-$DRIVER_NAME.yml" --device-name "$DEVICE_NAME" |