testeranto 0.219.2 → 0.219.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,9 +22,11 @@ const nodeDockerComposeFile = (config, container_name, fpath) => {
22
22
  exports.nodeDockerComposeFile = nodeDockerComposeFile;
23
23
  const externalTests = true;
24
24
  const nodeBuildCommand = (fpath) => {
25
- if (false) {
25
+ if (externalTests) {
26
26
  console.log("external tests");
27
- return `yarn tsx node_modules/testeranto/src/server/runtimes/node/node.ts /workspace/${fpath}`;
27
+ // return `yarn tsx /workspace/node_modules/testeranto/src/server/runtimes/node/node.ts /workspace/${fpath}`;
28
+ return `ls node_modules/testeranto/src`;
29
+ // return ["sh", "-c", "cd /workspace && javac -cp \".:lib/*\" src/server/runtimes/java/main.java && java -cp \"src/server/runtimes/java:.\" main"]
28
30
  }
29
31
  else {
30
32
  console.log("not external tests");
@@ -301,7 +301,7 @@ ${x}
301
301
  // console.warn(`[Server_Docker] Container for ${serviceName} did not appear after ${maxAttempts} attempts`);
302
302
  // return false;
303
303
  // }
304
- async startServiceLogging(serviceName, containerName, runtime, testName) {
304
+ async startServiceLogging(serviceName, runtime) {
305
305
  var _a, _b;
306
306
  // Create report directory
307
307
  const reportDir = path_1.default.join(process.cwd(), "testeranto", "reports", "allTests", "example", runtime);
@@ -449,6 +449,9 @@ ${x}
449
449
  console.log(`[Server_Docker] Starting builder service: ${serviceName}`);
450
450
  try {
451
451
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${serviceName}`);
452
+ this.startServiceLogging(serviceName, runtime)
453
+ .catch(error => console.error(`[Server_Docker] Failed to start logging for ${serviceName}:`, error));
454
+ this.captureExistingLogs(serviceName, runtime);
452
455
  }
453
456
  catch (error) {
454
457
  console.error(`[Server_Docker] Failed to start ${serviceName}: ${error.message}`);
@@ -479,8 +482,10 @@ ${x}
479
482
  try {
480
483
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${aiderServiceName}`);
481
484
  // Start logging for aider services
482
- this.startServiceLogging(aiderServiceName, aiderServiceName, runtime, testName)
485
+ this.startServiceLogging(aiderServiceName, runtime)
483
486
  .catch(error => console.error(`[Server_Docker] Failed to start logging for ${aiderServiceName}:`, error));
487
+ this.captureExistingLogs(aiderServiceName, runtime)
488
+ .catch(error => console.error(`[Server_Docker] Failed to capture existing logs for ${aiderServiceName}:`, error));
484
489
  }
485
490
  catch (error) {
486
491
  console.error(`[Server_Docker] Failed to start ${aiderServiceName}: ${error.message}`);
@@ -502,16 +507,16 @@ ${x}
502
507
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${bddServiceName}`);
503
508
  // Immediately start logging in the background
504
509
  // Don't wait for it to complete
505
- this.startServiceLogging(bddServiceName, bddServiceName, runtime, testName)
510
+ this.startServiceLogging(bddServiceName, runtime)
506
511
  .catch(error => console.error(`[Server_Docker] Failed to start logging for ${bddServiceName}:`, error));
507
512
  // Also capture any existing logs from the container (in case it already produced output)
508
- this.captureExistingLogs(bddServiceName, runtime, testName)
513
+ this.captureExistingLogs(bddServiceName, runtime)
509
514
  .catch(error => console.error(`[Server_Docker] Failed to capture existing logs for ${bddServiceName}:`, error));
510
515
  }
511
516
  catch (error) {
512
517
  console.error(`[Server_Docker] Failed to start ${bddServiceName}: ${error.message}`);
513
518
  // Even if starting failed, try to capture any logs that might exist
514
- this.captureExistingLogs(bddServiceName, runtime, testName)
519
+ this.captureExistingLogs(bddServiceName, runtime)
515
520
  .catch(err => console.error(`[Server_Docker] Also failed to capture logs:`, err));
516
521
  }
517
522
  }
@@ -531,23 +536,23 @@ ${x}
531
536
  try {
532
537
  await this.spawnPromise(`docker compose -f "testeranto/docker-compose.yml" up -d ${staticServiceName}`);
533
538
  // Start logging for this service
534
- this.startServiceLogging(staticServiceName, staticServiceName, runtime, testName)
539
+ this.startServiceLogging(staticServiceName, runtime)
535
540
  .catch(error => console.error(`[Server_Docker] Failed to start logging for ${staticServiceName}:`, error));
536
541
  // Also capture any existing logs
537
- this.captureExistingLogs(staticServiceName, runtime, testName)
542
+ this.captureExistingLogs(staticServiceName, runtime)
538
543
  .catch(error => console.error(`[Server_Docker] Failed to capture existing logs for ${staticServiceName}:`, error));
539
544
  }
540
545
  catch (error) {
541
546
  console.error(`[Server_Docker] Failed to start ${staticServiceName}: ${error.message}`);
542
547
  // Try to capture logs even if starting failed
543
- this.captureExistingLogs(staticServiceName, runtime, testName)
548
+ this.captureExistingLogs(staticServiceName, runtime)
544
549
  .catch(err => console.error(`[Server_Docker] Also failed to capture logs:`, err));
545
550
  }
546
551
  }
547
552
  }
548
553
  }
549
554
  }
550
- async captureExistingLogs(serviceName, runtime, testName) {
555
+ async captureExistingLogs(serviceName, runtime) {
551
556
  // Create report directory
552
557
  const reportDir = path_1.default.join(process.cwd(), "testeranto", "reports", "allTests", "example", runtime);
553
558
  try {