Skip to content

Commit

Permalink
feature (main): Run of mutation and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas committed Mar 18, 2022
1 parent 77bf260 commit 0f5a977
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 0 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ RUN apt-get update -y && \
apt-get install -y --no-install-recommends cmake manpages-dev gcc g++ && \
rm -rf /var/lib/apt/lists/*

#RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0-Linux-x86_64.sh \
# -q -O /tmp/cmake-install.sh \
# && chmod u+x /tmp/cmake-install.sh \
# && mkdir /usr/bin/cmake \
# && /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
# && rm /tmp/cmake-install.sh

# Installation of all requirements is done
# by first copying the requirements for pip
# this is done to ensure a better caching.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ clean:

.PHONY: build
build:
docker build -t canary:dev .
docker build -t canary:dev .

.PHONY: build
dev: build
Expand Down
8 changes: 6 additions & 2 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ def main():

output_file: str = open(mutated_file_path, "w+")
output_file.write(mutated_tree.text)
output_file.close()

original_results_file: str = open("/input/original_results.txt", "w")
subprocess.run(["make", "-C", "/input/", "build"])
subprocess.run(["/input/build/c_06_test"], stdout=original_results_file)
original_results_file.close()

os.rename(original_file_path, original_file_path + ".tmp")
os.rename(mutated_file_path, original_file_path)
sleep(1)

mutated_results_file: str = open("/input/mutated_results.txt", "w")
subprocess.run(["make", "-C", "/input/", "build"])
# subprocess.run(["/input/build/c_06_test"], stdout=mutated_results_file)
subprocess.run(["/input/build/c_06_test"], stdout=mutated_results_file)
mutated_results_file.close()

os.rename(original_file_path + ".tmp", original_file_path)

# original_results_file: str = open("/input/original_results.txt", "w")
# subprocess.run(["make", "-C", "/input/", "build"])
Expand Down

0 comments on commit 0f5a977

Please sign in to comment.