Skip to content

Commit d2f39b4

Browse files
committed
rq_cxl_tests.sh: add $NDCTL directory indirection
Useful for local testing (with sshfs or other). Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 0497cc2 commit d2f39b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/rq_cxl_tests.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# SPDX-License-Identifier: CC0-1.0
33
# Copyright (C) 2021 Intel Corporation. All rights reserved.
44

5+
: ${NDCTL:=/root/ndctl}
6+
57
cleanup()
68
{
79
systemctl poweroff
@@ -12,8 +14,8 @@ trap cleanup EXIT
1214
sleep 4
1315
echo "======= auto-running $0 ========" > /dev/kmsg
1416

15-
cd /root/ndctl || {
16-
printf '<0> FATAL: %s: no /root/ndctl directory' "$0" > /dev/kmsg
17+
cd "$NDCTL" || {
18+
printf '<0>FATAL: %s: no %s directory' "$0" "$NDCTL" > /dev/kmsg
1719
exit 1
1820
}
1921

@@ -41,7 +43,7 @@ dumpfile()
4143
set -x
4244
}
4345

44-
dumpfile /root/ndctl/build/meson-logs/testlog.txt
46+
dumpfile "$NDCTL"/build/meson-logs/testlog.txt
4547
echo "======= meson-test.log ========" > /dev/kmsg
4648
dumpfile "$logfile"
4749
echo "======= Done $0 ========" > /dev/kmsg

0 commit comments

Comments
 (0)