diff --git a/oioioi/sinolpack/files/sinol-makefiles.tgz b/oioioi/sinolpack/files/sinol-makefiles.tgz index 5de3ff9db..5116ed896 100644 Binary files a/oioioi/sinolpack/files/sinol-makefiles.tgz and b/oioioi/sinolpack/files/sinol-makefiles.tgz differ diff --git a/oioioi/sinolpack/files/test_interactive_package.tgz b/oioioi/sinolpack/files/test_interactive_package.tgz index 5548e9411..a45806d15 100644 Binary files a/oioioi/sinolpack/files/test_interactive_package.tgz and b/oioioi/sinolpack/files/test_interactive_package.tgz differ diff --git a/oioioi/sinolpack/files/test_inwer_input_names.zip b/oioioi/sinolpack/files/test_inwer_input_names.zip new file mode 100644 index 000000000..d975cb4ff Binary files /dev/null and b/oioioi/sinolpack/files/test_inwer_input_names.zip differ diff --git a/oioioi/sinolpack/package.py b/oioioi/sinolpack/package.py index 2b298ee85..445c91e3f 100644 --- a/oioioi/sinolpack/package.py +++ b/oioioi/sinolpack/package.py @@ -816,6 +816,7 @@ def _verify_inputs(self, tests): job['task_priority'] = TASK_PRIORITY job['exe_file'] = env['compiled_file'] job['in_file'] = django_to_filetracker_path(test.input_file) + job['in_file_name'] = self.short_name + test.name + '.in' job['use_sandboxes'] = self.use_sandboxes jobs[test.name] = job diff --git a/oioioi/sinolpack/tests.py b/oioioi/sinolpack/tests.py index d46ab2cf8..470e1b418 100644 --- a/oioioi/sinolpack/tests.py +++ b/oioioi/sinolpack/tests.py @@ -740,6 +740,30 @@ def test_inwer_failure_package(self): # Bad packages need to be left over for the error messages self.assertEqual(ProblemPackage.objects.count(), 1) + @both_configurations + def test_inwer_input_names(self): + ProblemInstance.objects.all().delete() + + contest = Contest.objects.get() + filename = get_test_filename('test_inwer_input_names.zip') + self.assertTrue(self.client.login(username='test_admin')) + url = reverse('oioioiadmin:problems_problem_add') + response = self.client.get(url, {'contest_id': contest.id}, follow=True) + url = response.redirect_chain[-1][0] + self.assertEqual(response.status_code, 200) + response = self.client.post( + url, + { + 'package_file': open(filename, 'rb'), + 'visibility': Problem.VISIBILITY_PRIVATE, + }, + follow=True, + ) + self.assertEqual(response.status_code, 200) + self.assertEqual(Problem.objects.count(), 1) + self.assertEqual(ProblemInstance.objects.count(), 2) + self.assertEqual(ProblemPackage.objects.count(), 1) + class TestSinolPackageCreator(TestCase, TestStreamingMixin): fixtures = [ diff --git a/requirements.txt b/requirements.txt index 627db2390..6913a0523 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ # These dependencies need to be installed from external sources, # therefore they must be listed here. Moreover, they cannot be listed in # setup.py, as pip is not able to install them. -http://github.com/sio2project/sioworkers/archive/refs/tags/v1.4.2.tar.gz +http://github.com/sio2project/sioworkers/archive/refs/tags/v1.4.3.tar.gz -e .