Skip to content

Commit

Permalink
op-e2e: Build the op-program client upfront (#13095)
Browse files Browse the repository at this point in the history
Now that multiple test processes are running at once, multiple threads are compiling the op-program client in the tests. This PR builds the client upfront to avoid this condition.
  • Loading branch information
mslipper authored Nov 26, 2024
1 parent d5dfd51 commit 915a1a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,10 @@ jobs:
- checkout
- attach_workspace:
at: "."
- run:
name: build op-program-client
command: make op-program-client
working_directory: op-program
- run:
name: run tests
no_output_timeout: <<parameters.no_output_timeout>>
Expand Down
11 changes: 11 additions & 0 deletions op-e2e/system/proofs/build_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package proofs

import (
"context"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
"time"
Expand All @@ -12,6 +14,15 @@ import (

// BuildOpProgramClient builds the `op-program` client executable and returns the path to the resulting executable
func BuildOpProgramClient(t *testing.T) string {
clientPath, err := filepath.Abs("../../../op-program/bin/op-program-client")
require.NoError(t, err)

_, err = os.Stat(clientPath)
if err == nil {
return clientPath
}
require.ErrorIs(t, err, os.ErrNotExist)

t.Log("Building op-program-client")
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
defer cancel()
Expand Down

0 comments on commit 915a1a3

Please sign in to comment.