Skip to content

Commit

Permalink
Revert time logging.
Browse files Browse the repository at this point in the history
Signed-off-by: Caroline Russell <[email protected]>
  • Loading branch information
cerrussell committed Nov 20, 2024
1 parent 097036c commit 5c1ea7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/snapshot-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
git checkout feature/expand-snapshots
- name: Generate scripts
env:
CDXGEN_DEBUG_MODE: debug
SDKMAN_DIR: "/home/snapshot1/.sdkman"
run: |
source .venv/bin/activate
python test/diff/generate.py -t java8,java17,javascript -s jazzer
Expand All @@ -55,8 +52,8 @@ jobs:

- name: Run scripts
env:
CDXGEN_DEBUG_MODE: debug
SDKMAN_DIR: "/home/snapshot1/.sdkman"
CDXGEN_LOG: $GITHUB_WORKSPACE/new_snapshots/generate.log
PREFER_MAVEN_DEPS_TREE: false
run: |
bash new_snapshots/cdxgen_commands.sh
Expand Down
6 changes: 3 additions & 3 deletions test/diff/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def exec_on_repo(clone, output_dir, skip_build, repo, cdxgen_log):
# cdxgen_cmd = f"source .venv/bin/activate && {cdxgen_cmd}"
# else:
# cdxgen_cmd = f"poetry env use {repo['language_range']} && {cdxgen_cmd}"
commands.append(f"$(time TIMEFORMAT='{repo['project']}: %E' {run_cdxgen(repo, output_dir)}) >> {cdxgen_log}\n\n")
commands.append(run_cdxgen(repo, output_dir))
commands = "\n".join(commands)
return commands

Expand Down Expand Up @@ -276,9 +276,9 @@ def generate(args):
commands = ""
cdxgen_log = args.output_dir.joinpath("generate.log")
for repo in processed_repos:
# commands += f"\necho {repo['project']} started at $(time) >> $CDXGEN_LOG\n"
commands += f"\necho {repo['project']} started: $(date) >> /home/snapshot1/actions-runner/_work/cdxgen/cdxgen/new_snapshots/generate.log\n"
commands += exec_on_repo(args.skip_clone, args.output_dir, args.skip_build, repo, cdxgen_log)
# commands += f"\necho {repo['project']} finished at $(time) >> $CDXGEN_LOG\n\n"
commands += f"\necho {repo['project']} finished: $(date) >> /home/snapshot1/actions-runner/_work/cdxgen/cdxgen/new_snapshots/generate.log\n\n"

commands = "".join(commands)
sh_path = Path.joinpath(args.output_dir, 'cdxgen_commands.sh')
Expand Down

0 comments on commit 5c1ea7d

Please sign in to comment.