FHIR / sushi

SUSHI (aka "SUSHI Unshortens Short Hand Inputs") is a reference implementation command-line interpreter/compiler for FHIR Shorthand (FSH).
Apache License 2.0
145 stars 44 forks source link

Regression script: handle errors thrown during repo compare #1419

Closed cmoesel closed 8 months ago

cmoesel commented 8 months ago

Prior to this PR, when running a regression, if the code that compares repos threw an error, it crashed the regression script. This fix catches the error, marks it as such, and generates the diff files with a message indicating that there was an error comparing the repos.

I don't if this particular error is an idiosyncracy on my system or reproducible on other systems. You can try to reproduce it and see if my PR fixes it.

  1. Checkout the master branch and run npm install
  2. Run npm run regression -- run -r FHIR/sql-on-fhir-v2#master
  3. It may crash with something like: _Unexpected error: [Error: ELOOP: too many symbolic links encountered, stat '/path/to/sushi/master/regression/output/FHIR-sql-on-fhir-v2-master/sushi-gh-master/testreport/public/implementations.json']
  4. Now checkout this PR branch
  5. Run npm run regression -- run -r FHIR/sql-on-fhir-v2#master
  6. It should report the status of the compare as ERROR in the CLI
  7. Click the diff links in the regression report and confirm they contain the error