From 16ddadaffb22976a3030f379fac6e64dfd212cf8 Mon Sep 17 00:00:00 2001 From: BO ZHANG Date: Wed, 21 Sep 2022 08:46:40 +0800 Subject: [PATCH] consider importability in exit code --- pipelines/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipelines/build.sh b/pipelines/build.sh index f4168d3..d04e484 100644 --- a/pipelines/build.sh +++ b/pipelines/build.sh @@ -46,11 +46,11 @@ coverage html echo "===================== importability =====================" echo " > try 'from $JOB_NAME.top_level_interface import *'" python -c "from $JOB_NAME.top_level_interface import *" -if [ "$?" != 0 ]; then - import_status=$? - echo "Failed!" +import_status=$? +if [ "$import_status" != 0 ]; then + echo "Import failed!" else - echo "Done!" + echo "Import done!" fi # the exit value is determined from unit tests -- GitLab