Skip to content

Commit 85ca7c3

Browse files
committed
fix(incus-builds): build-lxd.yml: Use absolute path to python binary
1 parent f32d69a commit 85ca7c3

2 files changed

Lines changed: 23 additions & 15 deletions

File tree

‎.github/workflows/build-lxd.yml‎

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,10 @@ jobs:
271271
set -x
272272
export GECKODRIVER_PATH="$GECKODRIVER_PATH"
273273
export FF_BINARY_PATH="$(which firefox)"
274+
python="$(dirname "$PWD")/.venv/bin/python"
274275
sudo "$LXC" exec ncp -- /usr/local/bin/ncc config:system:set overwrite.cli.url --value "https://nextcloudpi.local"
275276
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
276-
../.venv/bin/python activation_tests.py -t 300 --no-gui "nextcloudpi.local" 443 4443 || {
277+
"$python" activation_tests.py -t 300 --no-gui "nextcloudpi.local" 443 4443 || {
277278
echo "Activation test failed!"
278279
echo "Geckodriver logs:"
279280
tail -n 20 geckodriver.log >&2 || true
@@ -286,7 +287,7 @@ jobs:
286287
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
287288
exit 1
288289
}
289-
../.venv/bin/python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
290+
"$python" nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
290291
echo "Nextcloud test failed!"
291292
echo "Geckodriver logs:"
292293
tail -n 20 geckodriver.log >&2 || true
@@ -299,7 +300,7 @@ jobs:
299300
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
300301
exit 1
301302
}
302-
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --non-interactive --skip-update-test || {
303+
USE_INCUS="$USE_INCUS" "$python" system_tests.py --non-interactive --skip-update-test || {
303304
echo "System test failed!"
304305
exit 1
305306
}
@@ -380,8 +381,9 @@ jobs:
380381
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
381382
export GECKODRIVER_PATH="$GECKODRIVER_PATH"
382383
export FF_BINARY_PATH="$(which firefox)"
384+
python="$(dirname "$PWD")/.venv/bin/python"
383385
384-
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --skip-update-test --non-interactive || {
386+
USE_INCUS="$USE_INCUS" "$python" system_tests.py --skip-update-test --non-interactive || {
385387
echo "System test failed!"
386388
echo "ncp.log: "
387389
sudo "$LXC" exec ncp -- bash -c "tail -n20 /var/log/ncp.log" || true
@@ -391,7 +393,7 @@ jobs:
391393
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
392394
exit 1
393395
}
394-
../.venv/bin/python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
396+
"$python" nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
395397
echo "Nextcloud test failed!"
396398
echo "Geckodriver logs:"
397399
tail -n 20 geckodriver.log >&2 || true
@@ -494,7 +496,8 @@ jobs:
494496
export FF_BINARY_PATH="$(which firefox)"
495497
sudo "$LXC" exec ncp -- /usr/local/bin/ncc config:system:set overwrite.cli.url --value "https://nextcloudpi.local"
496498
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
497-
../.venv/bin/python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
499+
python="$(dirname "$PWD")/.venv/bin/python"
500+
"$python" activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
498501
echo "Activation test failed!"
499502
echo "Geckodriver logs:"
500503
tail -n 20 geckodriver.log >&2 || true
@@ -507,7 +510,7 @@ jobs:
507510
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
508511
exit 1
509512
}
510-
../.venv/bin/python nextcloud_tests.py --skip-release-check --no-gui "nextcloudpi.local" 443 4443 || {
513+
"$python" nextcloud_tests.py --skip-release-check --no-gui "nextcloudpi.local" 443 4443 || {
511514
echo "Nextcloud test failed!"
512515
echo "Geckodriver logs:"
513516
tail -n 20 geckodriver.log >&2 || true
@@ -520,7 +523,7 @@ jobs:
520523
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
521524
exit 1
522525
}
523-
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --non-interactive --skip-update-test || {
526+
USE_INCUS="$USE_INCUS" "$python" system_tests.py --non-interactive --skip-update-test || {
524527
echo "System test failed!"
525528
echo "ncp.log: "
526529
sudo "$LXC" exec ncp -- bash -c "tail -n20 /var/log/ncp.log" || true
@@ -600,8 +603,9 @@ jobs:
600603
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
601604
export GECKODRIVER_PATH="$GECKODRIVER_PATH"
602605
export FF_BINARY_PATH="$(which firefox)"
606+
python="$(dirname "$PWD")/.venv/bin/python"
603607
604-
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --skip-update-test --non-interactive || {
608+
USE_INCUS="$USE_INCUS" "$python" system_tests.py --skip-update-test --non-interactive || {
605609
echo "System test failed!"
606610
echo "ncp.log: "
607611
sudo "$LXC" exec ncp -- bash -c "tail -n20 /var/log/ncp.log" || true
@@ -611,7 +615,7 @@ jobs:
611615
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
612616
exit 1
613617
}
614-
../.venv/bin/python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
618+
"$python" nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
615619
echo "Nextcloud test failed!"
616620
echo "Geckodriver logs:"
617621
tail -n 20 geckodriver.log >&2 || true
@@ -696,8 +700,9 @@ jobs:
696700
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
697701
export GECKODRIVER_PATH="$GECKODRIVER_PATH"
698702
export FF_BINARY_PATH="$(which firefox)"
703+
python="$(dirname "$PWD")/.venv/bin/python"
699704
700-
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --skip-update-test --non-interactive || {
705+
USE_INCUS="$USE_INCUS" "$python" system_tests.py --skip-update-test --non-interactive || {
701706
echo "System test failed!"
702707
echo "ncp.log: "
703708
sudo "$LXC" exec ncp -- bash -c "tail -n20 /var/log/ncp.log" || true
@@ -707,7 +712,7 @@ jobs:
707712
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
708713
exit 1
709714
}
710-
../.venv/bin/python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
715+
"$python" nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
711716
echo "Nextcloud test failed!"
712717
echo "Geckodriver logs:"
713718
tail -n 20 geckodriver.log >&2 || true
@@ -813,7 +818,9 @@ jobs:
813818
export FF_BINARY_PATH="$(which firefox)"
814819
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
815820
sudo "$LXC" exec ncp -- bash -c 'ncc config:system:get overwrite.cli.url'
816-
../.venv/bin/python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
821+
python="$(dirname "$PWD")/.venv/bin/python"
822+
823+
"$python" activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
817824
echo "Activation test failed!"
818825
echo "Geckodriver logs:"
819826
tail -n 20 geckodriver.log >&2 || true
@@ -827,7 +834,7 @@ jobs:
827834
exit 1
828835
}
829836
sudo "$LXC" exec ncp -- bash -c 'ncc config:system:get overwrite.cli.url'
830-
../.venv/bin/python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
837+
"$python" nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
831838
echo "Nextcloud test failed!"
832839
echo "Geckodriver logs:"
833840
tail -n 20 geckodriver.log >&2 || true
@@ -842,7 +849,7 @@ jobs:
842849
sudo "$LXC" exec ncp -- bash -c 'grep -R opcache.interned_strings_buffer /etc/php/*/fpm/conf.d/'
843850
exit 1
844851
}
845-
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --non-interactive || {
852+
USE_INCUS="$USE_INCUS" "$python" system_tests.py --non-interactive || {
846853
echo "System test failed!"
847854
exit 1
848855
}

‎.github/workflows/build-sd-images.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ jobs:
302302
for attempt in {1..5}
303303
do
304304
echo -e "${LOG_CICD} == System Tests (attempt $attempt/5) =="
305+
# TODO: Reenable update test
305306
USE_SUDO=yes ./.venv/bin/python tests/system_tests.py --skip-update-test --non-interactive |& awk "{ print \"${LOG_TEST} \" \$0 }"
306307
[[ ${PIPESTATUS[0]} -eq 0 ]] || {
307308
echo -e "${LOG_CICD} System test failed!"

0 commit comments

Comments
 (0)