diff mbox series

[v2,10/23] travis: Don't copy files into .bm-work/

Message ID 20200315234303.18598-8-sjg@chromium.org
State Superseded
Headers show
Series gitlab: Simplify the test script | expand

Commit Message

Simon Glass March 15, 2020, 11:42 p.m. UTC
At present if TEST_PY_BD is empty the script copies various files into a
directory, to no purpose. This happens because UBOOT_TRAVIS_BUILD_DIR is
set before TEST_PY_BD is tested.

Move the 'if' to fix this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2:
- Add a new patch to avoid copying files into .bm-work/

 .travis.yml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Tom Rini March 16, 2020, 9:23 p.m. UTC | #1
On Sun, Mar 15, 2020 at 05:42:50PM -0600, Simon Glass wrote:

> At present if TEST_PY_BD is empty the script copies various files into a
> directory, to no purpose. This happens because UBOOT_TRAVIS_BUILD_DIR is
> set before TEST_PY_BD is tested.
> 
> Move the 'if' to fix this.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Tom Rini <trini at konsulko.com>
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index c59bd7790b..f6e3a5d3af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -130,12 +130,12 @@  script:
  # never prevent any test from running. That way, we can always pass
  # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
  # value.
- - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
-   cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
-   cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/;
-   cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
-   cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
-   if [[ "${TEST_PY_BD}" != "" ]]; then
+ - if [[ "${TEST_PY_BD}" != "" ]]; then
+     export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
+     cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
+     cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/;
+     cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
+     cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
      virtualenv -p /usr/bin/python3 /tmp/venv;
      . /tmp/venv/bin/activate;
      pip install -r test/py/requirements.txt;