Skip to content
Snippets Groups Projects
Commit 43d27907 authored by toole1's avatar toole1
Browse files

jack autograder work

git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@3397 6fbd10e7-183d-0410-a318-cb416676e4f2
parent cf321533
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ Critical ...@@ -44,6 +44,7 @@ Critical
better output on student idiocy better output on student idiocy
x on crazy memory errors, glibc issues, valgrind aborts x on crazy memory errors, glibc issues, valgrind aborts
x fix "" failure messages x fix "" failure messages
x on EXIT_IF_ERROR crashes
if compilation fails if compilation fails
STYLE STYLE
Directory structure for config.ini includes Directory structure for config.ini includes
...@@ -51,6 +52,9 @@ Critical ...@@ -51,6 +52,9 @@ Critical
readFile() bug where lines have ':' or '?' in them?! readFile() bug where lines have ':' or '?' in them?!
x safer cross-platform exec() x safer cross-platform exec()
x setenv("PATH"...) to safe path and use execlp x setenv("PATH"...) to safe path and use execlp
remove all system() calls
fix make system() call in monad.cpp - need some varargs or something
replace ln -s util/* system() calls
Moderately important Moderately important
--------------------- ---------------------
...@@ -63,8 +67,9 @@ Moderately important ...@@ -63,8 +67,9 @@ Moderately important
x add mechanisms for custom output checks x add mechanisms for custom output checks
fix sigalarm security hole fix sigalarm security hole
optimization optimization
replace ln -s util/* system() calls
mp1_newtests and lab02_newtests currently have 2 different ways of compiling 2 programs. this should be unified mp1_newtests and lab02_newtests currently have 2 different ways of compiling 2 programs. this should be unified
more elegant way of handling mp4's Makefile.1 for part 1 in config.ini
possibly have the MP part number be defined when calling make and handle it internally.
Doesn't really matter Doesn't really matter
--------------------- ---------------------
...@@ -73,3 +78,4 @@ Doesn't really matter ...@@ -73,3 +78,4 @@ Doesn't really matter
fix unknown times, maybe only output timeout fix unknown times, maybe only output timeout
remove additional output under valgrind remove additional output under valgrind
...@@ -76,10 +76,11 @@ int main(int argc, char ** argv) ...@@ -76,10 +76,11 @@ int main(int argc, char ** argv)
{ {
using namespace monad; using namespace monad;
output::set_error_message();
// Find monad/ directory // Find monad/ directory
find_base_dir(argv[0]); find_base_dir(argv[0]);
// Read in local config settings. // Read in local config settings.
// Necessary to do this early for [SVN Root] url // Necessary to do this early for [SVN Root] url
readConfig("./", config); readConfig("./", config);
...@@ -89,7 +90,6 @@ int main(int argc, char ** argv) ...@@ -89,7 +90,6 @@ int main(int argc, char ** argv)
cout << "Testing " << name << "..." << endl << endl; cout << "Testing " << name << "..." << endl << endl;
cout << "Setting up test environment..." << endl; cout << "Setting up test environment..." << endl;
output::set_error_message();
// Read in test-specific config settings // Read in test-specific config settings
if (mp_part == no_mp_part) if (mp_part == no_mp_part)
...@@ -123,7 +123,7 @@ int main(int argc, char ** argv) ...@@ -123,7 +123,7 @@ int main(int argc, char ** argv)
for (size_t i = 0; i < processing_commands.size(); i++) for (size_t i = 0; i < processing_commands.size(); i++)
exec_command(processing_commands[i]); exec_command(processing_commands[i]);
string makestr = "/usr/bin/make --warn-undefined-variables"; string makestr = "/usr/bin/make --quiet --warn-undefined-variables";
if (opts::optimize) if (opts::optimize)
makestr += " OPTIMIZE=on"; makestr += " OPTIMIZE=on";
if (!config["Make Options"].empty()) if (!config["Make Options"].empty())
...@@ -135,6 +135,10 @@ int main(int argc, char ** argv) ...@@ -135,6 +135,10 @@ int main(int argc, char ** argv)
// Compile with make // Compile with make
system(makestr.c_str()); // yes, system is insecure if the user has control system(makestr.c_str()); // yes, system is insecure if the user has control
// over config.ini. But students don't. // over config.ini. But students don't.
// TODO (toole1): Yeah but this leaves us open to
// aliasing issues, or forces us to specify make's
// path. Ugly either way.
// TODO exec("make", "--quiet", "--warn-undefined-variables",
cout << endl << endl; cout << endl << endl;
int score = exec("./proxy"); int score = exec("./proxy");
......
...@@ -53,6 +53,9 @@ int main(int argc, char ** argv) ...@@ -53,6 +53,9 @@ int main(int argc, char ** argv)
{ {
using namespace proxy; using namespace proxy;
// set up EXIT_IF_ERROR messages
output::set_error_message();
// Set up run-time environment // Set up run-time environment
RunTimeEnvironment env(global_tests, global_output_checks); RunTimeEnvironment env(global_tests, global_output_checks);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment