From patchwork Sun Mar 15 23:42:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 243682 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 15 Mar 2020 17:42:57 -0600 Subject: [PATCH v2 17/23] gitlab/azure: Use -w flag for all test.py builds In-Reply-To: <20200315234303.18598-1-sjg@chromium.org> References: <20200315234303.18598-1-sjg@chromium.org> Message-ID: <20200315234303.18598-14-sjg@chromium.org> Avoid needing to know about the internal .bm-work directory, by passing the -w flag to buildman. This is not needed on travis since the -w flag is already used (from a previous patch). Drop the -P flag since this has no effect if -w is used. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Leave in the repeated call to buildman - Update azure also .azure-pipelines.yml | 6 +++--- .gitlab-ci.yml | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 96f279853e..b7222db97f 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -245,16 +245,16 @@ jobs: cp /opt/grub/grubarm.efi ~/grub_arm.efi # the below corresponds to .gitlab-ci.yml "script" cd ${WORK_DIR} + export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD}; ret=0; - tools/buildman/buildman -o /tmp -P -E --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?; + tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?; if [[ $ret -ne 0 && $ret -ne 129 ]]; then - tools/buildman/buildman -o /tmp -seP --board ${TEST_PY_BD}; + tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -se --board ${TEST_PY_BD}; exit $ret; fi virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate pip install -r test/py/requirements.txt - export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/${TEST_PY_BD}; export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b29d59d942..38f2cba69f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,11 +29,13 @@ stages: script: # From buildman, exit code 129 means warnings only. If we've been asked to # use clang only do one configuration. + - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD} - ret=0; - tools/buildman/buildman -o /tmp -P -E --board ${TEST_PY_BD} ${OVERRIDE} - || ret=$?; + tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E + --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?; if [[ $ret -ne 0 && $ret -ne 129 ]]; then - tools/buildman/buildman -o /tmp -seP --board ${TEST_PY_BD}; + tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -se + --board ${TEST_PY_BD}; exit $ret; fi # "not a_test_which_does_not_exist" is a dummy -k parameter which will @@ -43,8 +45,7 @@ stages: - virtualenv -p /usr/bin/python3 /tmp/venv - . /tmp/venv/bin/activate - pip install -r test/py/requirements.txt - - export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/${TEST_PY_BD}; - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; + - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"