Skip to content

Commit

Permalink
Test updates on new DOI code.
Browse files Browse the repository at this point in the history
  • Loading branch information
msdemlei committed Nov 21, 2023
1 parent 57effde commit 33d8245
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion regressiontest/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ changes, this is a regression test that goes through the motions of
starting a document and building it, exercising as many of the features
mentioned in ivoatexDoc as I can.

See the docstring in run-regression.py on how to add to the tests.

Maintained by Markus Demleitner <[email protected]>

Distributed under CC-0 by the IVOA.
Distributed under CC0 by the IVOA.
18 changes: 14 additions & 4 deletions regressiontest/run-regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def test_referencing():
'We are not talking about Plante and Stébé et al. (2010)',
"Bradner, S. (1997), ‘Key words",
"Collections, Services Version 1.1’",
"https://doi.org/10.5479/ADS/bib/2010ivoa.spec.1202P")
"doi:10.5479/ADS/bib/2010ivoa.spec.1202P")

execute("make bib-suggestions",
"2010ivoa.spec.1202P -> 2021ivoa.spec.1102D ?")
Expand Down Expand Up @@ -455,7 +455,7 @@ def test_all_bibliography():
'<a href="https://ui.adsabs.harvard.edu/abs/2006ASPC..351..666T"><tt>https://ui.', # rendered link
'<dt><b>Plante &amp; Demleitner et al. (2018)</b></dt>', # from ivoabib
'IVOA Recommendation 25 June 2018', # howpublished rendered
'<a href="http:https://doi.org/10.5479/ADS/bib/2018ivoa.spec.0625P"><tt>https://doi.org/10.5479', # ivoabib link
'doi:<a href="https:https://doi.org/10.5479/ADS/bib/2006ivoa.rept.0606A"><tt>10.5479/ADS/bib/2006ivoa.rept.0606A</tt></a>,', # ivoabib doi link
)


Expand Down Expand Up @@ -506,7 +506,15 @@ def run_tests(repo_url, branch_name):

test_all_bibliography()

run_shell()
# run_shell()


def clean_environment():
"""drops environment variables that may adversely influence our
tests.
"""
# java spits these out when called, spoiling our outputs
del os.environ["JDK_JAVA_OPTIONS"]


def parse_command_line():
Expand All @@ -525,6 +533,7 @@ def parse_command_line():


def main():
clean_environment()
args = parse_command_line()

if args.repo_url is None:
Expand All @@ -535,9 +544,10 @@ def main():
print(f"Testing in {dir}")
os.chdir(dir)
run_tests(args.repo_url, args.branch_name)
print("All tests passed.")
except Exception as ex:
traceback.print_exc()
print(f"**Failure. Dumping you in a shell in the testbed.")
print(f"*** Failure. Dumping you in a shell in the testbed.")
print("Exit the shell to tear it down.")
run_shell()

Expand Down

0 comments on commit 33d8245

Please sign in to comment.