Skip to content

This repository contains a script that aims to extract, compile and test homeworks written in C++ and submitted in moodle.

License

Notifications You must be signed in to change notification settings

Mapmo/cpp_homework_tester

Repository files navigation

This script is intended to test homeworks written in cpp.

The main file is cpp_homework_tester.py and depending on the parameters passed, it calls the other files

To get information about the script, just execute it and a usage text will be printed

All tests that contain letters should contain only uppercase letters, since it is hard for students to follow exact patterns.

How to use the scripts in the project:

  • cpp_homework_tester.py:
    • cpp_homework_tester.py ZIP_FILE TESTS_DIR - will extract all zips from zip_file_all_homeworks, compile the solutions and test them
            --notest - does not run tests, only attempts to compile all files from zip_file_all
    • cpp_homework_tester.py HW_DIR TEST_DIR [FN]... - does not compile solutions, HW_DIR is a directory that contains directories named with students ids
    • If FNs are passed, the tests will be conducted only for the specified students. The .results file will be overwritten!
  • How to use tools/read_results.py
    • Usage: tools/read_results.py JSON_FILE [[[FN] [TASK_ID] [TEST_ID]]]
            --false - prints only the tests that appear to have failed the testing
  • How to use tools/read_results.py
    • Usage: tools/analyze_results.py JSON_FILE [TASK] [TEST_ID]

About

This repository contains a script that aims to extract, compile and test homeworks written in C++ and submitted in moodle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages