-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/pip/patool-gte-1.12-and-lt-3.1
- Loading branch information
Showing
47 changed files
with
406 additions
and
170 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo chown cmsuser:cmsuser ./codecov | ||
|
||
dropdb --host=testdb --username=postgres cmsdbfortesting | ||
createdb --host=testdb --username=postgres cmsdbfortesting | ||
cmsInitDB | ||
|
||
pytest --cov . --cov-report xml:codecov/unittests.xml | ||
UNIT=$? | ||
|
||
dropdb --host=testdb --username=postgres cmsdbfortesting | ||
createdb --host=testdb --username=postgres cmsdbfortesting | ||
cmsInitDB | ||
|
||
cmsRunFunctionalTests -v --coverage codecov/functionaltests.xml | ||
FUNC=$? | ||
|
||
# This check is needed because otherwise failing unit tests aren't reported in | ||
# the CI as long as the functional tests are passing. Ideally we should get rid | ||
# of `cmsRunFunctionalTests` and make those tests work with pytest so they can | ||
# be auto-discovered and run in a single command. | ||
if [ $UNIT -ne 0 ] || [ $FUNC -ne 0 ] | ||
then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Contest Management System - http://cms-dev.github.io/ | ||
# Copyright © 2024 Filippo Casarin <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""C++20 programming language definition.""" | ||
|
||
from cms.grading import CompiledLanguage | ||
|
||
|
||
__all__ = ["Cpp20Gpp"] | ||
|
||
|
||
class Cpp20Gpp(CompiledLanguage): | ||
"""This defines the C++ programming language, compiled with g++ (the | ||
version available on the system) using the C++20 standard. | ||
""" | ||
|
||
@property | ||
def name(self): | ||
"""See Language.name.""" | ||
return "C++20 / g++" | ||
|
||
@property | ||
def source_extensions(self): | ||
"""See Language.source_extensions.""" | ||
return [".cpp", ".cc", ".cxx", ".c++", ".C"] | ||
|
||
@property | ||
def header_extensions(self): | ||
"""See Language.header_extensions.""" | ||
return [".h"] | ||
|
||
@property | ||
def object_extensions(self): | ||
"""See Language.object_extensions.""" | ||
return [".o"] | ||
|
||
def get_compilation_commands(self, | ||
source_filenames, executable_filename, | ||
for_evaluation=True): | ||
"""See Language.get_compilation_commands.""" | ||
command = ["/usr/bin/g++"] | ||
if for_evaluation: | ||
command += ["-DEVAL"] | ||
command += ["-std=gnu++20", "-O2", "-pipe", "-static", | ||
"-s", "-o", executable_filename] | ||
command += source_filenames | ||
return [command] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.