Open
Conversation
The old script was unsuccessfully trying to copy all of usr/bin/x86_64... into the jail. This new version only copies the standard c++ library from that directory It is also heavily refactored to look more like the new java jail script.
# Conflicts: # .gitignore
At this point the contest is pretty much working. Most of the basic features have been manually tested. There is one known issue: The judge UID and GID are hardcoded in chroot_wrapper. These values must be changed for every contest.
node_modules, vendor, and composer.* were in the repo, and Santa almost had to kill a kitten. Lickily the crisis was averted and the binaries were removed and added to .gitignore. I tested the install to make sure it still works and it does.
Instead of categorizing tests by the user, I want to categorize tests by feature and put user-specific commands in actor classes. So I split up the existing AcceptanceTester code into three classes and did some refactoring. More functionality definitely needs to be added but this is a start.
I took the existing tests, restructured them, and added new stubs.
I did a lot of moving around and refactoring. Some deleting too. I'm intending to do this to the admin tests as well but I don't have time at the moment.
I didn't want to call login() in every test so I decided to put it in the class constructor.
I moved more of the admin tests into the structure I'm using. They aren't fitting super well though. I will probably change it up some in the near future
Geisler and I decided that all the setup for every test should exist in the actor classes. I started moving all the setup code for the ClarificationCest to the Judge and Team Actors.
Calling your parent's constructor in your constructor is important and I forgot to do that earlier
Tested and working.
Now the three actors have a parent class, AcceptanceTester. AcceptanceTester automatically loads attributes from the various .ini files for each type of actor. The .ini files contain things like the name of the contest and the various actor's usernames.
This includes adding a method and a few attributes to CreatorActor. Untested
This was necessary because the tests can't connect to the database immediately because it doesn't exist until we create it in CreateCest
The thing I tried last didn't end up working. The current solution is somewhat hackish but at least it's automatically invoked. See Helper/Acceptance for more info
The creation test works now woohoo
# Conflicts: # public_html/judge/py_lib/java_submission.py # public_html/judge/py_lib/submission.py # tests/_data/example_submissions/exceeds_output_limit/src.py2
The method now waits for 120 seconds because a few edge cases cause auto judging to take more than a minute. We also set the cronscript to be called automatically and fixed the code invokes the script.
geisler
reviewed
Jan 23, 2019
TestCompileCest tests the test compile feature for teams
Created TestCompileCest
geisler
reviewed
Jan 24, 2019
Owner
geisler
left a comment
There was a problem hiding this comment.
- Let's delete
develop/old_chroot_wrapper.c,develop/start_contest.crontab,develop/stop_contest.crontabas part of this commit. - I like
exec_and_check()inlib/create.inc - There are a lot of files with new permission of 755 that should have stayed 644 since they aren't directly executable. For example,
public_html/admin/email_body.txt. - In
update_database(), do theTRUNCATEtable commands reset the autoincrementing IDs for the table? If not, I would like to find a way to ensure the cloned contest IDs start at 0. - Let's not keep line 196 of
public_html/admin/setup_contest.phpsince it is just commented out debugging print out. - There appear to be some lines that are longer than 80 characters. That is a personal pet peeve of mine because I often log in to the system with a console of exactly 80 characters and the line wrap is visually annoying. An example would be line 117 of
public_html/admin/setup_headers.php. - What does the tag
garph 2019inpublic_html/admin/setup_team_category.phpline 70 mean? public_html/judge/errorLog.txtshould not be in the repo.- Line 31 of
public_html/judge/py_lib/c_submission.pyshould probably have its regular expression changed tor'(#include\s+["<][^">]+[">])' - Similarly, the regular expression in
public_html/judge/py_lib/java_submission.pyshould probably be changed tor'(import\s+[^;]+;)'. - The
public_html/judge/py_lib/c_config.inifile should probably add-fno-asmto its compiler flags to match the CXX compiler flags. - I'm leery of having
-oin the compiler flags for C/C++ because it needs to immediately proceed the executable name in the command line. This is not an optional flag that can be set or cleared by someone configuring the software and could carelessly be removed. I think this flag should be explicitly added to the compile command since it must always be there and always be in that exact location in the command.
|
On your fourth comment, here's documentation stating that it does reset the auto incrementing IDs: https://oracle-base.com/articles/mysql/mysql-how-truncate-table-affects-auto-increment |
Removed accidental joke comment
I removed -o from the config files and added it into the code so that it could not be accidentally removed or misplaced. -fno-asm was also added to the c compiler flags
Contributor
Author
|
On the line length issue: There are quite a few lines in the repo that exceed 80 characters. We were using a limit of 120 characters. Would you like us to go through the lines we committed and shorten them to 80 characters? |
calling the cronscript with the --rejudge flag will recalculate all the responses in the AUTO_RESPONSES and JUDGED_SUBMISSIONS table
The queue ID was being put in the AUTO_RESPONSES table instead of the judged id
This flag takes the human judge out of the loop and assigns final judgements to queued submissions
These added features are currently not exposed to the users, so they're not truly new features yet. The important thing is the bugfixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features Implemented:
Issues resolved:
We also fixed quite a few bugs not mentioned in the issues