File tree Expand file tree Collapse file tree
java/src/main/java/io/gitfire/testkit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ jobs:
130130 - name : Run Python wrapper smoke tests
131131 shell : bash
132132 env :
133- GIT_TESTKIT_CLI : ${{ matrix.os == 'windows-latest' && '../../ bin/git-testkit-cli.exe' || '../. ./bin/git-testkit-cli' }}
133+ GIT_TESTKIT_CLI : ${{ matrix.os == 'windows-latest' && './ bin/git-testkit-cli.exe' || './bin/git-testkit-cli' }}
134134 run : |
135135 cd testkit/python
136136 python -m pip install -e ".[dev]"
@@ -139,7 +139,7 @@ jobs:
139139 - name : Run Java wrapper smoke tests
140140 shell : bash
141141 env :
142- GIT_TESTKIT_CLI : ${{ matrix.os == 'windows-latest' && '../../ bin/git-testkit-cli.exe' || '../. ./bin/git-testkit-cli' }}
142+ GIT_TESTKIT_CLI : ${{ matrix.os == 'windows-latest' && './ bin/git-testkit-cli.exe' || './bin/git-testkit-cli' }}
143143 run : |
144144 cd testkit/java
145145 mvn -Dtest=CliBridgeTest,SampleRepoFlowSmoke,SampleSnapshotFlowSmoke test
Original file line number Diff line number Diff line change 1414import java .util .concurrent .Future ;
1515import java .util .regex .Matcher ;
1616import java .util .regex .Pattern ;
17+ import java .nio .file .Paths ;
1718
1819public final class CliBridge {
1920 private static final Pattern ERROR_PATTERN =
@@ -185,7 +186,11 @@ private static List<String> shellCommand(String cliCommand) {
185186 private static List <String > defaultCliCommandArgs () {
186187 String configuredCli = System .getenv ("GIT_TESTKIT_CLI" );
187188 if (configuredCli != null && !configuredCli .isBlank ()) {
188- return shellCommand (configuredCli );
189+ Path cliPath = Paths .get (configuredCli );
190+ if (!cliPath .isAbsolute ()) {
191+ cliPath = detectWorkspaceRoot ().resolve (cliPath ).normalize ();
192+ }
193+ return shellCommand (cliPath .toString ());
189194 }
190195 return List .of ("go" , "run" , "./cmd/git-testkit-cli" );
191196 }
Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ def _repo_root() -> Path:
1717def _cli_cmd () -> list [str ]:
1818 cli = os .environ .get ("GIT_TESTKIT_CLI" , "" ).strip ()
1919 if cli :
20- return [cli ]
20+ cli_path = Path (cli )
21+ if not cli_path .is_absolute ():
22+ cli_path = _repo_root () / cli_path
23+ return [str (cli_path )]
2124 return ["go" , "run" , "./cmd/git-testkit-cli" ]
2225
2326
You can’t perform that action at this time.
0 commit comments