From 925baa87feaf0aa71663cd29030bfed64b00c31e Mon Sep 17 00:00:00 2001 From: Kevin Lu Date: Sun, 7 Apr 2024 00:22:11 +0000 Subject: [PATCH] Additional bug fixes --- harness/constants.py | 17 +++++++++++++---- harness/context_manager.py | 18 +++++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/harness/constants.py b/harness/constants.py index 30c6ca7e..1231533f 100644 --- a/harness/constants.py +++ b/harness/constants.py @@ -228,7 +228,7 @@ k: { "python": "3.9", "install": "python setup.py install", - "pip_packages": "pytest extension-helpers numpy", + "pip_packages": "pytest extension-helpers numpy==1.19.5", } for k in ["0.1", "0.2", "0.3", "0.4", "1.1", "1.2", "1.3", "3.0", "3.1", "3.2"] } @@ -238,12 +238,22 @@ k: { "python": "3.9", "install": "pip install -e .[test]", - "pip_packages": "pytest extension-helpers numpy", + "pip_packages": "pytest extension-helpers numpy==1.19.5", } for k in ["4.1", "4.2", "4.3", "5.0", "5.1", "5.2"] } ) +MAP_VERSION_TO_INSTALL_SYMPY = { + k: { + "python": "3.7", + "packages": "mpmath flake8", + "pip_packages": "flake8-comprehensions", + "install": "pip install -e .", + } + for k in + ["0.7", "1.0", "1.1", "1.10", "1.11", "1.12", "1.2", "1.4", "1.5"] +} MAP_VERSION_TO_INSTALL_SYMPY = { k: { "python": "3.9", @@ -252,8 +262,7 @@ "install": "pip install -e .", } for k in - ["0.7", "1.0", "1.1", "1.10", "1.11", "1.12", "1.2", "1.4", "1.5", "1.6"] + \ - ["1.7", "1.8", "1.9"] + ["1.6", "1.7", "1.8", "1.9"] } MAP_VERSION_TO_INSTALL_SYMPY.update( { diff --git a/harness/context_manager.py b/harness/context_manager.py index fa81c627..4c324b9a 100644 --- a/harness/context_manager.py +++ b/harness/context_manager.py @@ -342,7 +342,14 @@ def __enter__(self): logger_testbed.info( f"[Testbed] Installing environment dependencies {pkgs}; Command: {full_cmd}" ) - self.exec(full_cmd, shell=True) + # breakpoint() + self.exec( + full_cmd, + shell=True, + executable="/bin/bash", + timeout=self.timeout, + env=None + ) # Install additional packages if specified if "pip_packages" in install: @@ -692,6 +699,15 @@ def run_tests_task(self, instance: dict): # test_cmd = test_cmd.replace("./tests/runtests.py ", "pip install -e . && ./tests/runtests.py --parallel=1 ") # Fix Django installs with open(self.log_file, "a") as f: f.write(f"Test Script: {test_cmd};\n") + print(self.exec( + "pwd", + shell=True, + timeout=self.timeout, + check=False, + executable="/bin/bash", + text=True, + env=None + )) breakpoint() out_test = self.exec( test_cmd,