Skip to content

Commit

Permalink
qemu-test-init: remove BUILD_DIR_FULL
Browse files Browse the repository at this point in the history
There is no purpose on having one variable with a relative and one with
an absolute path.

Also simplify RAUC_TEST_NBD_SERVER.
  • Loading branch information
ejoerns committed Jul 18, 2024
1 parent bc83ef3 commit 941a073
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions qemu-test-init
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ mount -t overlay overlay -o lowerdir=/etc,upperdir=/tmp/etc-overlay,workdir=/tmp
# switch to rauc dir
cd "$(dirname "$0")"

BUILD_DIR="build/"
BUILD_DIR_FULL="$(realpath build)/"
BUILD_DIR="$(realpath build)/"

# parse cmdline
for x in $(cat /proc/cmdline); do
Expand Down Expand Up @@ -76,7 +75,7 @@ fi

save_gcov_data () {
if [ -n "$GCOV_PREFIX" ]; then
cp -r -T "$GCOV_PREFIX$BUILD_DIR_FULL" "$BUILD_DIR_FULL" || true
cp -r -T "$GCOV_PREFIX$BUILD_DIR" "$BUILD_DIR" || true
fi
}

Expand Down Expand Up @@ -111,7 +110,7 @@ if [ -n "$SHELL" ]; then
cp -a $BUILD_DIR/rauc /tmp/bin/rauc
export PATH=/tmp/bin:$PATH
fi
export RAUC_TEST_NBD_SERVER="$(realpath $BUILD_DIR/rauc)"
export RAUC_TEST_NBD_SERVER="$BUILD_DIR/rauc"

if type losetup; then
truncate --size=64M /tmp/rauc-disk.img
Expand Down

0 comments on commit 941a073

Please sign in to comment.