mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-16 04:50:29 -07:00
repro: rich logging and focused tests
This commit is contained in:
@@ -269,6 +269,12 @@ export class HookRunner {
|
||||
shellConfig.shell,
|
||||
);
|
||||
|
||||
if (process.env['CI'] === 'true' || process.env['VERBOSE'] === 'true') {
|
||||
console.log(`[HookRunner] shellConfig: ${JSON.stringify(shellConfig)}`);
|
||||
console.log(`[HookRunner] command: ${command}`);
|
||||
console.log(`[HookRunner] cwd: ${input.cwd}`);
|
||||
}
|
||||
|
||||
// Set up environment variables
|
||||
const env = {
|
||||
...sanitizeEnvironment(process.env, this.config.sanitizationConfig),
|
||||
@@ -338,6 +344,12 @@ export class HookRunner {
|
||||
clearTimeout(timeoutHandle);
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
if (process.env['CI'] === 'true' || process.env['VERBOSE'] === 'true') {
|
||||
console.log(`[HookRunner] Hook closed. exitCode: ${exitCode}, duration: ${duration}ms`);
|
||||
console.log(`[HookRunner] stdout: ${stdout}`);
|
||||
console.log(`[HookRunner] stderr: ${stderr}`);
|
||||
}
|
||||
|
||||
if (timedOut) {
|
||||
resolve({
|
||||
hookConfig,
|
||||
|
||||
@@ -1253,6 +1253,11 @@ export class TestRig {
|
||||
}[] = [];
|
||||
|
||||
for (const logData of parsedLogs) {
|
||||
if (env['VERBOSE'] === 'true' || env['CI'] === 'true') {
|
||||
if (logData.attributes?.['event.name']?.includes('tool')) {
|
||||
console.log(`[TestRig] Found tool-related log: ${JSON.stringify(logData.attributes)}`);
|
||||
}
|
||||
}
|
||||
// Look for tool call logs
|
||||
if (
|
||||
logData.attributes &&
|
||||
@@ -1410,6 +1415,11 @@ export class TestRig {
|
||||
}[] = [];
|
||||
|
||||
for (const logData of parsedLogs) {
|
||||
if (env['VERBOSE'] === 'true' || env['CI'] === 'true') {
|
||||
if (logData.attributes?.['event.name']?.includes('hook')) {
|
||||
console.log(`[TestRig] Found hook-related log: ${JSON.stringify(logData.attributes)}`);
|
||||
}
|
||||
}
|
||||
// Look for tool call logs
|
||||
if (
|
||||
logData.attributes &&
|
||||
|
||||
Reference in New Issue
Block a user