Skip to content

Commit

Permalink
Tidy up tests and logfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Dec 31, 2024
1 parent 72e4a57 commit e1de43d
Show file tree
Hide file tree
Showing 24 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint": "yarn evm:lint",
"typechain": "yarn evm:typechain",
"test": "yarn evm:test && yarn ciphernode:test",
"test:integration": "./tests/basic_integration/test.sh",
"test:integration": "./tests/integration/test.sh",
"coverage": "yarn evm:coverage",
"enclave": "cd packages/ciphernode && ./scripts/launch.sh",
"ciphernode:lint": "cd packages/ciphernode && cargo fmt -- --check",
Expand Down
3 changes: 0 additions & 3 deletions tests/basic_integration/lib/pack_e3_params.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions tests/basic_integration/fns.sh → tests/integration/fns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ heading() {
echo ""
}

strip_ansi() {
sed 's/\x1b\[[0-9;]*m//g'
}

waiton() {
local file_path="$1"
until [ -f "$file_path" ]; do
Expand Down Expand Up @@ -102,7 +106,7 @@ launch_ciphernode() {
mkdir -p "$log_dir"
$ENCLAVE_BIN start -v \
--tag "$name" \
--config "$SCRIPT_DIR/lib/$name/config.yaml" 2>&1 | tee "$log_file" & echo $! > "/tmp/enclave.${ID}_${name}.pid"
--config "$SCRIPT_DIR/lib/$name/config.yaml" 2>&1 | tee >(strip_ansi > "$log_file") & echo $! > "/tmp/enclave.${ID}_${name}.pid"
}

set_private_key() {
Expand Down Expand Up @@ -136,7 +140,7 @@ launch_aggregator() {
--tag "$name" \
--config "$SCRIPT_DIR/lib/$name/config.yaml" \
--pubkey-write-path "$SCRIPT_DIR/output/pubkey.bin" \
--plaintext-write-path "$SCRIPT_DIR/output/plaintext.txt" 2>&1 | tee "$log_file" & echo $! > "/tmp/enclave.${ID}_${name}.pid"
--plaintext-write-path "$SCRIPT_DIR/output/plaintext.txt" 2>&1 | tee >(strip_ansi > "$log_file") & echo $! > "/tmp/enclave.${ID}_${name}.pid"
}

kill_proc() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions tests/integration/lib/pack_e3_params.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

./packages/ciphernode/target/debug/pack_e3_params "$@"
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/usr/bin/env sh

echo ""
echo "PREBUILDING BINARIES..."
echo ""
cd packages/ciphernode && cargo build --bin fake_encrypt --bin enclave --bin pack_e3_params;
echo ""
echo "FINISHED PREBUILDING BINARIES"
echo ""
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e1de43d

Please sign in to comment.