Skip to contentSkip to conversation

travis.yml: Use TRAVIS_BUILD_DIR to refer to the top directory

PATCH Applied Thomas Huth 2 participants 2 messages Sep 25, 2020 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis.yml: Use TRAVIS_BUILD_DIR to refer to the top directory

Travis already has an environment variable that points to the top of the checked-out source code, TRAVIS_BUILD_DIR. We can use it to avoid the guessing of the right location of the configure script.

---
 .travis.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
.travis.yml +1 -2
index 3bc05ce..e9c18e4 100644
@@ -175,8 +175,7 @@ before_script:
       sudo chmod g+s /usr/bin/qemu-system-* ;
     fi
   - mkdir -p $BUILD_DIR && cd $BUILD_DIR
-  - if [ -e ./configure ]; then ./configure $CONFIG ; fi
-  - if [ -e ../configure ]; then ../configure $CONFIG ; fi
+  - $TRAVIS_BUILD_DIR/configure $CONFIG
 script:
   - make -j3
   - ACCEL="${ACCEL:-tcg}" ./run_tests.sh -v $TESTS | tee results.txt
Signature · 1 line
2.18.2
maintainer Applied
#1 lore raw
Quoted 15 lines · Thomas Huth

Travis already has an environment variable that points to the top of the checked-out source code, TRAVIS_BUILD_DIR. We can use it to avoid the guessing of the right location of the configure script.

---
 .travis.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
.travis.yml +0 -0
index 3bc05ce..e9c18e4 100644

.travis.yml before_script: · line 181

Quoted 9 lines
.travis.yml +1 -2
@@ -175,8 +175,7 @@ before_script:
       sudo chmod g+s /usr/bin/qemu-system-* ;
     fi
   - mkdir -p $BUILD_DIR && cd $BUILD_DIR
-  - if [ -e ./configure ]; then ./configure $CONFIG ; fi
-  - if [ -e ../configure ]; then ../configure $CONFIG ; fi
+  - $TRAVIS_BUILD_DIR/configure $CONFIG
 script:
   - make -j3
   - ACCEL="${ACCEL:-tcg}" ./run_tests.sh -v $TESTS | tee results.txt

Applied, thanks.

Paolo