Commit Graph

8 Commits

Author SHA1 Message Date
ConorB 906aa4a8a8 Switch timeout mechanism to subprocess.run (#659)
* Switch to subprocess.run for timeouts

* [experiment] Set CI TIMEOUT_SCALE_FACTOR to 1

* supress parameterized.expand error in event of no compilers, change TIMEOUT_SCALE_FACTOR in CI to 2

* Exempt dummy compilers from nsjail bind mounts, disable nsjail time limits

* Don't run timeout test on windows

* Decouple test_compiler_timeout's timeout from global timeout settings, reset TIMEOUT_SCALE_FACTOR to 10

* Have DummyLongRunningCompiler subclass DummyCompiler

* Have a timeout of zero disable timeouts entirely

* Skip test_zero_timeout on windows

* black

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-21 03:04:27 +09:00
ConorB 721a08ccdf Make exception_on_timeout production-compatible, add more timeouts (#653)
* Force exception_on_timeout to use spawn to make gunicorn happy

* black

* Have test_fpr_reg_names_output and test_giant_compilation test for success as opposed to a lack of output

* Refactor timeouts for:
- compiling
- decompiling
- assembling
- disassembling

* Move m2c timeout wrapper to prevent interfering with StringIO

* Increase default timeouts by an order of magnitude to investigate failing CI tests

* Add timeout scale factor, have CI timeouts be 10x default

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-15 01:28:48 +09:00
Alex Bates 3bd4742878 exception_on_timeout: dont thread if timeout <= 0 2023-01-04 16:17:58 +00:00
ConorB 560a3d4455 Implement timeouts for m2c and compiler invocations (#628)
As this title suggests, this PR caps the runtime for all compiler / m2c
calls. Currently, the timeout is five seconds for both.

There may well be a better place to put the compile timeout; as ever,
happy to change :)

Co-authored-by: ConorBobbleHat <ConorBobbleHat>
2022-12-26 19:44:44 +09:00
Ethan Roseman eb7534be0d Black (#380)
* Initial format

* action

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "ee239a2b"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "ee239a2b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "6704d61f"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "6704d61f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* vscode

* fix

* .
2022-02-20 23:21:38 +09:00
Ethan Roseman 066cc11bc3 Add startup time to hash so the cache is effectively cleared on restart 2021-10-05 21:14:19 +09:00
Zach Banks c05d7f07a0 Add mypy type checking (#100)
* Add mypy type checking

* PR Feedback

- Remove TODO-stubbed code
- Annotate `*args` as `str`s
- Push `Optional[str] --> ""` into callers
2021-08-26 14:49:33 -04:00
Ethan Roseman 09d8527314 work on forking, caching, etc 2021-08-08 23:58:01 +09:00