Skip to content

Commit 4faf74d

Browse files
committed
[STAGE] Staged changes before going home
1 parent a4fca41 commit 4faf74d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

PyChecker/testing_suite/fillit_checker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ def run(root_path: str, project_path: str):
2323

2424
# @todo: Find a way to supress colors from output
2525
result = subprocess.run(['bash', root_path + "/testing_suites/fillit_checker/test.sh", project_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode('utf-8')
26-
print(result)
2726
with open(root_path + '/.myfillitchecker', 'w+') as file:
2827
file.write(result)
28+
result = subprocess.run(['bash', root_path + '/scripts/clean_logfiles.sh', root_path + '/.myfillitchecker'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode('utf-8')
2929
with open(root_path + '/.myfillitchecker', 'r') as file:
30+
print(file.read())
3031
for line in file:
3132
if "NOTE" in line:
3233
return line

scripts/clean_logfiles.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
function check_cleanlog
4+
{
5+
local RET0 LOGFILENAME
6+
LOGFILENAME="$1"
7+
if [ -f "$LOGFILENAME" ]
8+
then
9+
RET0=`cat -e "$LOGFILENAME" | awk '{gsub(/\^M.*\^M/, ""); gsub(/\^@/, ""); gsub(/\^[\[]*[0-9;]*[MmHJ]/, ""); gsub(/[\$]$/, ""); print}'`
10+
echo "$RET0" > "$LOGFILENAME"
11+
fi
12+
}
13+
14+
check_cleanlog $1

0 commit comments

Comments
 (0)