Skip to content

Commit

Permalink
Ensure logs dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Sep 27, 2024
1 parent f923dc2 commit 52b9cb8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
export LD_LIBRARY_PATH="$(pwd)/rust-sdk/target/debug"
export COMPLEMENT_CRYPTO_RPC_BINARY="$(pwd)/rpc"
set -o pipefail &&
go test -v -json -tags='jssdk,rust' -count=1 -timeout 15m ./tests ./tests/js ./tests/rust | gotestfmt
go test -p 3 -v -json -tags='jssdk,rust' -count=1 -timeout 15m ./tests ./tests/js ./tests/rust | gotestfmt
shell: bash # required for pipefail to be A Thing. pipefail is required to stop gotestfmt swallowing non-zero exit codes
name: Run Complement Crypto Tests
env:
Expand Down
1 change: 1 addition & 0 deletions internal/api/langs/lang_jssdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func (b *JSLanguageBindings) PreTestRun(contextID string) {
if contextID != "" {
contextID = "_" + contextID
}
os.Mkdir("./logs", 0750) // ensure directory exists
js.SetupJSLogs(fmt.Sprintf("./logs/js_sdk%s.log", contextID))
}

Expand Down
1 change: 0 additions & 1 deletion tests/rust/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var (
func TestMain(m *testing.M) {
instance = cc.NewInstance(config.NewComplementCryptoConfigFromEnvVars("../mitmproxy_addons"))
instance.TestMain(m, "rust")

}

// Instance returns the test instance. Guaranteed to be non-nil if called in a test,
Expand Down

0 comments on commit 52b9cb8

Please sign in to comment.