File tree Expand file tree Collapse file tree 8 files changed +40
-25
lines changed
Expand file tree Collapse file tree 8 files changed +40
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- include ../Makefile.guess
1+ BUILD_DIR = $( exec ../../tools/find-build-dir.sh )
22
33all setup clean run :
44 @basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR ) ./test.sh --$@
Original file line number Diff line number Diff line change 1- include ../Makefile.guess
1+ BUILD_DIR = $( exec ../../tools/find-build-dir.sh )
22
33all setup run :
44 @basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR ) ./test.sh --$@
Original file line number Diff line number Diff line change 1- include ../Makefile.guess
1+ BUILD_DIR = $( exec ../../tools/find-build-dir.sh )
22
33all setup clean run :
44 @basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR ) ./test.sh --$@
Original file line number Diff line number Diff line change 1- include ../Makefile.guess
1+ BUILD_DIR = $( exec ../../tools/find-build-dir.sh )
22
33all setup clean run :
44 @basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR ) ./test.sh --$@
Original file line number Diff line number Diff line change 1- include ../Makefile.guess
1+ BUILD_DIR = $( exec ../../tools/find-build-dir.sh )
22
33all setup clean run :
44 @basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR ) ./test.sh --$@
Original file line number Diff line number Diff line change 11#! /bin/bash -e
22
3- if ! test -d ../build ; then
4- echo " Expected build directory in ../build, but couldn't find it." >&2
5- exit 1
6- fi
3+ BUILD_DIR=" $( $( dirname " $0 " ) /../tools/find-build-dir.sh) "
74
8- ninja -C ../build
5+ ninja -C " $BUILD_DIR "
96
107declare -A results
118
129RESULT=0
1310FAILURES=0
1411
12+ cd " $( dirname " $0 " ) "
1513for TEST in TEST-?? -* ; do
1614 echo -e " \n--x-- Starting $TEST --x--"
1715 set +e
18- make -C " $TEST " BUILD_DIR=$( pwd ) /../build clean setup run
16+ make -C " $TEST " " BUILD_DIR=$BUILD_DIR " clean setup run
1917 RESULT=$?
2018 set -e
2119 echo " --x-- Result of $TEST : $RESULT --x--"
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+
3+ # Try to guess the build directory:
4+ # we look for subdirectories of the parent directory that look like ninja build dirs.
5+
6+ if [ -n " $BUILD_DIR " ]; then
7+ echo " $( realpath " $BUILD_DIR " ) "
8+ exit 0
9+ fi
10+
11+ root=" $( dirname " $( realpath " $0 " ) " ) "
12+
13+ found=
14+ for i in " $root " /../* /build.ninja; do
15+ c=" $( dirname $i ) "
16+ [ -d " $c " ] || continue
17+ [ " $( basename " $c " ) " != mkosi.builddir ] || continue
18+
19+ if [ -n " $found " ]; then
20+ echo ' Found multiple candidates, specify build directory with $BUILD_DIR' >&2
21+ exit 2
22+ fi
23+ found=" $c "
24+ done
25+
26+ if [ -z " $found " ]; then
27+ echo ' Specify build directory with $BUILD_DIR' >&2
28+ exit 1
29+ fi
30+
31+ echo " $( realpath $found ) "
You can’t perform that action at this time.
0 commit comments