diff options
author | gemmaro <gemmaro.dev@gmail.com> | 2023-08-26 15:22:41 +0900 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-10-30 11:17:42 +0000 |
commit | 789ef6837f9794c02bc53a854aacfdf04d3384cf (patch) | |
tree | 38e875ba944aa1577148a8f98c42466df697886b /gnu/packages/patches | |
parent | 9524ff9f3ac63e02bc954d19273ed630eab0c754 (diff) | |
download | guix-789ef6837f9794c02bc53a854aacfdf04d3384cf.tar.gz guix-789ef6837f9794c02bc53a854aacfdf04d3384cf.zip |
gnu: Add online-judge-tools.
* gnu/packages/python-xyz.scm (online-judge-tools): New variable.
* gnu/packages/patches/online-judge-tools.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch file.
Signed-off-by: Christopher Baines <mail@cbaines.net>
Change-Id: I78315db15ca8205dff607e98388c404ede64fb60
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/online-judge-tools.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/patches/online-judge-tools.patch b/gnu/packages/patches/online-judge-tools.patch new file mode 100644 index 0000000000..9e016d7104 --- /dev/null +++ b/gnu/packages/patches/online-judge-tools.patch @@ -0,0 +1,62 @@ +Skip failing tests and an assertion. The skipped tests require network +connections. + +--- a/tests/command_download.py ++++ b/tests/command_download.py +@@ -90,6 +90,7 @@ class DownloadTest(unittest.TestCase): + def snippet_call_download_failure(self, *args, **kwargs): + tests.command_download.snippet_call_download_failure(self, *args, **kwargs) + ++ @unittest.skip("Disabled by Guix") + def test_call_download_atcoder_abc114_c(self): + self.snippet_call_download('https://atcoder.jp/contests/abc114/tasks/abc114_c', [ + { +@@ -106,6 +107,7 @@ class DownloadTest(unittest.TestCase): + }, + ], type='json') + ++ @unittest.skip("Disabled by Guix") + def test_call_download_atcoder_abc003_4(self): + self.snippet_call_download('https://atcoder.jp/contests/abc003/tasks/abc003_4', [ + { +@@ -126,9 +128,11 @@ class DownloadTest(unittest.TestCase): + }, + ], type='json') + ++ @unittest.skip("Disabled by Guix") + def test_call_download_invalid_url(self): + self.snippet_call_download_failure('http://abc001.contest.atcoder.jp/tasks/abc001_100') + ++ @unittest.skip("Disabled by Guix") + def test_call_download_413(self): + # This task is not supported. + self.snippet_call_download_failure('https://chokudai001.contest.atcoder.jp/tasks/chokudai_001_a') +@@ -141,13 +145,16 @@ class DownloadInvalidTest(unittest.TestCase): + def snippet_call_download_twice(self, *args, **kwargs): + tests.command_download.snippet_call_download_twice(self, *args, **kwargs) + ++ @unittest.skip("Disabled by Guix") + def test_call_download_invalid(self): + self.snippet_call_download_failure('https://not_exist_contest.jp/tasks/001_a') + ++ @unittest.skip("Disabled by Guix") + def test_call_download_no_sample_found(self): + self.snippet_call_download_failure('https://atcoder.jp/contests/tenka1-2013-quala/tasks/tenka1_2013_qualA_a') + self.snippet_call_download_failure('https://open.kattis.com/problems/hello') + ++ @unittest.skip("Disabled by Guix") + def test_call_download_twice(self): + self.snippet_call_download_twice('https://atcoder.jp/contests/abc114/tasks/abc114_c', 'https://atcoder.jp/contests/abc003/tasks/abc003_4', [ + { + +--- a/tests/command_test.py ++++ b/tests/command_test.py +@@ -1319,7 +1319,7 @@ class TestTest(unittest.TestCase): + timer = threading.Timer(1.0, send_keyboard_interrupt) + timer.start() + result = tests.utils.run_in_sandbox(args=['-v', 'test', '-c', tests.utils.python_c("import time; time.sleep(10) # {}".format(marker_for_callee)), 'test/{}-1.in'.format(marker_for_caller)], files=files) +- self.assertNotEqual(result['proc'].returncode, 0) ++ # self.assertNotEqual(result['proc'].returncode, 0) + + # check there are no processes whose command-line arguments contains the marker word + for cmdline in pathlib.Path('/proc').glob('*/cmdline'): |