From a11136f8999a46188baf153a9430e6d5f2bb9239 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 26 Apr 2022 17:27:53 -0400 Subject: [PATCH] test: hyde --- tests/gocr/hyde/Makefile | 6 +++--- tests/gocr/hyde/run.sh | 2 +- tests/gocr/hyde/spec.json | 20 ++++++++++++-------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/gocr/hyde/Makefile b/tests/gocr/hyde/Makefile index 3140d30..c9fae24 100644 --- a/tests/gocr/hyde/Makefile +++ b/tests/gocr/hyde/Makefile @@ -13,10 +13,10 @@ debug: SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert --eval-command="run spec.json" client: - curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@hyde.pnm" "${HOSTNAME}:10000" + curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@hyde.pnm" "${HOSTNAME}:10000/gocr" client2: - curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../handwriting/handwrt1.pnm" "${HOSTNAME}:10000" + curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../handwriting/handwrt1.pnm" "${HOSTNAME}:10000/gocr" client3: - curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../fivebyeight/5x8.pnm" "${HOSTNAME}:10000" + curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../fivebyeight/5x8.pnm" "${HOSTNAME}:10000/gocr" diff --git a/tests/gocr/hyde/run.sh b/tests/gocr/hyde/run.sh index 5a45b8e..e5d430e 100755 --- a/tests/gocr/hyde/run.sh +++ b/tests/gocr/hyde/run.sh @@ -21,7 +21,7 @@ experiment_client() { local -ir total_count=10 for ((i = 0; i < total_count; i++)); do - result=$(curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@hyde.pnm" "$hostname:10000" 2> /dev/null) + result=$(curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@hyde.pnm" "$hostname:10000/gocr" 2> /dev/null) if [[ "$result" == "$expected_result" ]]; then ((success_count++)) else diff --git a/tests/gocr/hyde/spec.json b/tests/gocr/hyde/spec.json index f53cbf1..9802ece 100644 --- a/tests/gocr/hyde/spec.json +++ b/tests/gocr/hyde/spec.json @@ -1,12 +1,16 @@ [ { - "name": "gocr", - "path": "gocr.wasm.so", + "name": "gwu", "port": 10000, - "expected-execution-us": 5000, - "relative-deadline-us": 360000, - "http-req-size": 5335057, - "http-resp-size": 5335057, - "http-resp-content-type": "text/plain" + "routes": [ + { + "route": "/gocr", + "path": "gocr.wasm.so", + "expected-execution-us": 5000, + "relative-deadline-us": 360000, + "http-resp-size": 5335057, + "http-resp-content-type": "text/plain" + } + ] } -] +] \ No newline at end of file