Skip to content

Commit

Permalink
fix: test commands fix. Run max_parallelism/main.go from a temporal d…
Browse files Browse the repository at this point in the history
…irectory works. (#99)
  • Loading branch information
david-montano-circleci authored Dec 20, 2024
1 parent 6ed27bc commit b5a5964
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/commands/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ steps:
ORB_VAL_RUN: <<parameters.run>>
ORB_EVAL_COVER_PROFILE: <<parameters.coverprofile>>
ORB_EVAL_PROJECT_PATH: <<parameters.project-path>>
MAX_PARALLELISM_GO_CONTENTS: <<include(max_parallelism/main.go)>>
command: <<include(scripts/test.sh)>>
name: "go test"
no_output_timeout: <<parameters.no_output_timeout>>
File renamed without changes.
5 changes: 4 additions & 1 deletion src/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
if [ "${ORB_VAL_PARALLEL}" = "m" ] || [ "${ORB_VAL_PARALLEL_TESTS}" = "m" ]; then
GOMAXPROCS=$(go run max_parallelism/main.go)
mkdir -p /tmp/go-orb/max_parallelism/
echo "$MAX_PARALLELISM_GO_CONTENTS" > /tmp/go-orb/max_parallelism/main.go
GOMAXPROCS=$(go run /tmp/go-orb/max_parallelism/main.go)
rm -rf /tmp/go-orb
fi

if [ "${ORB_VAL_PARALLEL}" = "m" ]; then
Expand Down

0 comments on commit b5a5964

Please sign in to comment.