summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-x[-rw-r--r--]examples/gguf-split/tests.sh16
-rw-r--r--examples/quantize/tests.sh (renamed from examples/quantize/test.sh)16
-rwxr-xr-xexamples/server/tests/tests.sh7
3 files changed, 19 insertions, 20 deletions
diff --git a/examples/gguf-split/tests.sh b/examples/gguf-split/tests.sh
index 879522f7..57588204 100644..100755
--- a/examples/gguf-split/tests.sh
+++ b/examples/gguf-split/tests.sh
@@ -4,16 +4,16 @@ set -eu
if [ $# -lt 1 ]
then
- echo "usage: $0 path_to_build_binary [path_to_temp_folder]"
- echo "example: $0 ../../build/bin ../../tmp"
- exit 1
+ echo "usage: $0 path_to_build_binary [path_to_temp_folder]"
+ echo "example: $0 ../../build/bin ../../tmp"
+ exit 1
fi
if [ $# -gt 1 ]
then
- TMP_DIR=$2
+ TMP_DIR=$2
else
- TMP_DIR=/tmp
+ TMP_DIR=/tmp
fi
set -x
@@ -21,7 +21,7 @@ set -x
SPLIT=$1/gguf-split
MAIN=$1/main
WORK_PATH=$TMP_DIR/gguf-split
-CUR_DIR=$(pwd)
+ROOT_DIR=$(realpath $(dirname $0)/../../)
mkdir -p "$WORK_PATH"
@@ -30,8 +30,8 @@ rm -f $WORK_PATH/ggml-model-split*.gguf $WORK_PATH/ggml-model-merge*.gguf
# 1. Get a model
(
- cd $WORK_PATH
- "$CUR_DIR"/../../scripts/hf.sh --repo ggml-org/gemma-1.1-2b-it-Q8_0-GGUF --file gemma-1.1-2b-it.Q8_0.gguf
+cd $WORK_PATH
+"$ROOT_DIR"/scripts/hf.sh --repo ggml-org/gemma-1.1-2b-it-Q8_0-GGUF --file gemma-1.1-2b-it.Q8_0.gguf
)
echo PASS
diff --git a/examples/quantize/test.sh b/examples/quantize/tests.sh
index 840f712a..160c12be 100644
--- a/examples/quantize/test.sh
+++ b/examples/quantize/tests.sh
@@ -4,16 +4,16 @@ set -eu
if [ $# -lt 1 ]
then
- echo "usage: $0 path_to_build_binary [path_to_temp_folder]"
- echo "example: $0 ../../build/bin ../../tmp"
- exit 1
+ echo "usage: $0 path_to_build_binary [path_to_temp_folder]"
+ echo "example: $0 ../../build/bin ../../tmp"
+ exit 1
fi
if [ $# -gt 1 ]
then
- TMP_DIR=$2
+ TMP_DIR=$2
else
- TMP_DIR=/tmp
+ TMP_DIR=/tmp
fi
set -x
@@ -22,7 +22,7 @@ SPLIT=$1/gguf-split
QUANTIZE=$1/quantize
MAIN=$1/main
WORK_PATH=$TMP_DIR/quantize
-CUR_DIR=$(pwd)
+ROOT_DIR=$(realpath $(dirname $0)/../../)
mkdir -p "$WORK_PATH"
@@ -31,8 +31,8 @@ rm -f $WORK_PATH/ggml-model-split*.gguf $WORK_PATH/ggml-model-requant*.gguf
# 1. Get a model
(
- cd $WORK_PATH
- "$CUR_DIR"/../../scripts/hf.sh --repo ggml-org/gemma-1.1-2b-it-Q8_0-GGUF --file gemma-1.1-2b-it.Q8_0.gguf
+cd $WORK_PATH
+"$ROOT_DIR"/scripts/hf.sh --repo ggml-org/gemma-1.1-2b-it-Q8_0-GGUF --file gemma-1.1-2b-it.Q8_0.gguf
)
echo PASS
diff --git a/examples/server/tests/tests.sh b/examples/server/tests/tests.sh
index 1c6c5695..72a0fbad 100755
--- a/examples/server/tests/tests.sh
+++ b/examples/server/tests/tests.sh
@@ -4,9 +4,8 @@ set -eu
if [ $# -lt 1 ]
then
- # Start @llama.cpp scenario
- behave --summary --stop --no-capture --exclude 'issues|wrong_usages|passkey' --tags llama.cpp
+ # Start @llama.cpp scenario
+ behave --summary --stop --no-capture --exclude 'issues|wrong_usages|passkey' --tags llama.cpp
else
- behave "$@"
+ behave "$@"
fi
-