Skip to content
Snippets Groups Projects
Commit 6f1d56c1 authored by zaglanz's avatar zaglanz
Browse files

linux fixed

parent f3d03d3d
No related branches found
No related tags found
2 merge requests!2Merge for work. Discard merge branch.,!1Code not finished, but runnable. Use it as a base for work.
#! /usr/bin/sh
#! /usr/bin/bash
# Script to run the program, generate its coverage information
# and move it to a directory
# Make directory to save the output
mkdir -p Temporary
GAN_Inputs=(./GAN/*.txt)
GAN_Inputs=(./GanSamples/*.txt)
Total=${#GAN_Inputs[@]}
echo Total $Total
GAME=0
......@@ -20,9 +20,9 @@ for input in "${GAN_Inputs[@]}"; do
# Generate the coverage information
fd -d 1 -e gcda -X gcov > /dev/null
# Make directory to save the output
mkdir -p ./GanCoverage/Game$GAME/
cp UnixGanInput ./GanCoverage/Game$GAME/input
fd -d 1 -e gcov -e gameOut -X mv {} ./GanCoverage/Game$GAME
mkdir -p ../.././GanCoverage/Game$GAME/
cp UnixGanInput ../.././GanCoverage/Game$GAME/input
fd -d 1 -e gcov -e gameOut -X mv {} ../.././GanCoverage/Game$GAME
cd ../../
rm -rf ./Temporary/Zork$GAME
done
......
%% Cell type:code id: tags:
``` python
import subprocess
#subprocess.call(['C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell', './getCoverageGAN.sh'])
subprocess.run(['C:\Program Files\Git\git-bash.exe', './getCoverageGAN.sh'])
#subprocess.run(['C:\Program Files\Git\git-bash.exe', './getCoverageGAN.sh'])
subprocess.run(['./getCoverageGAN_l.sh'])
```
%% Output
CompletedProcess(args=['C:\\Program Files\\Git\\git-bash.exe', './getCoverageGAN.sh'], returncode=0)
CompletedProcess(args=['./getCoverageGAN_l.sh'], returncode=2)
%% Cell type:code id: tags:
``` python
subprocess.run(['C:\Program Files\Git\git-bash.exe', './remove_output.sh'])
```
%% Output
CompletedProcess(args=['C:\\Program Files\\Git\\git-bash.exe', './remove_output.sh'], returncode=0)
%% Cell type:code id: tags:
``` python
```
......
This diff is collapsed.
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