@@ -34,7 +34,7 @@ import { __dirname, extensionDevelopmentPath, exercisesPath } from "./paths.js"
3434import { getExercises } from "./exercises.js"
3535
3636const maxConcurrency = 2
37- const taskTimeLimit = 2 * 60 * 1_000
37+ const taskTimeLimit = 5 * 60 * 1_000
3838
3939const testCommands : Record < ExerciseLanguage , { commands : string [ ] ; timeout ?: number ; cwd ?: string } > = {
4040 cpp : { commands : [ "cmake -G 'Unix\\ Makefiles' -DEXERCISM_RUN_ALL_TESTS=1 .." , "make" ] , cwd : "build" } , // timeout 15s bash -c "cd '$dir' && mkdir -p build && cd build && cmake -G 'Unix Makefiles' -DEXERCISM_RUN_ALL_TESTS=1 .. >/dev/null 2>&1 && make >/dev/null 2>&1"
@@ -94,8 +94,8 @@ const run = async (toolbox: GluegunToolbox) => {
9494 throw new Error ( "No tasks found." )
9595 }
9696
97- console . log ( await execa ( { cwd : exercisesPath } ) `git config --global user.name "Roo Code"` )
98- console . log ( await execa ( { cwd :
exercisesPath } ) `git config --global user.email "[email protected] "` ) 97+ console . log ( await execa ( { cwd : exercisesPath } ) `git config user.name "Roo Code"` )
98+ console . log ( await execa ( { cwd :
exercisesPath } ) `git config user.email "[email protected] "` ) 9999 console . log ( await execa ( { cwd : exercisesPath } ) `git checkout -f` )
100100 console . log ( await execa ( { cwd : exercisesPath } ) `git clean -fd` )
101101 console . log ( await execa ( { cwd : exercisesPath } ) `git checkout -b runs/${ run . id } main` )
@@ -170,11 +170,12 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
170170 const cancelSignal = controller . signal
171171
172172 // If debugging:
173- // Use --log trace or --verbose.
174- let codeCommand = `code --wait --log trace --disable-workspace-trust`
173+ // Use --wait --log trace or --verbose.
174+ let codeCommand = `code --disable-workspace-trust`
175+ const isDocker = fs . existsSync ( "/.dockerenv" )
175176
176- if ( fs . existsSync ( "/.dockerenv" ) ) {
177- codeCommand = `xvfb-run --auto-servernum --server-num=1 ${ codeCommand } --disable-gpu --password-store="basic"`
177+ if ( isDocker ) {
178+ codeCommand = `xvfb-run --auto-servernum --server-num=1 ${ codeCommand } --wait --log trace -- disable-gpu --password-store="basic"`
178179 }
179180
180181 const subprocess = execa ( {
@@ -189,7 +190,7 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
189190 // subprocess.stdout.pipe(process.stdout)
190191
191192 // Give VSCode some time to spawn before connectint to its unix socket.
192- await new Promise ( ( resolve ) => setTimeout ( resolve , 2_000 ) )
193+ await new Promise ( ( resolve ) => setTimeout ( resolve , isDocker ? 5_000 : 1_000 ) )
193194 console . log ( `Connecting to ${ taskSocketPath } (pid: ${ subprocess . pid } )` )
194195
195196 const createClient = ( taskSocketPath : string ) => {
@@ -207,7 +208,7 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
207208
208209 while ( ++ tries < 5 ) {
209210 try {
210- await pWaitFor ( ( ) => client . isReady , { interval : 100 , timeout : 2_000 } )
211+ await pWaitFor ( ( ) => client . isReady , { interval : 100 , timeout : 5_000 } )
211212 break
212213 } catch ( error ) {
213214 console . error ( error )
@@ -227,8 +228,8 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
227228
228229 const ignoreEvents : RooCodeEventName [ ] = [
229230 RooCodeEventName . Message ,
230- RooCodeEventName . TaskTokenUsageUpdated ,
231- RooCodeEventName . TaskAskResponded ,
231+ // RooCodeEventName.TaskTokenUsageUpdated,
232+ // RooCodeEventName.TaskAskResponded,
232233 ]
233234
234235 let taskStartedAt = Date . now ( )
0 commit comments