about summary refs log tree commit diff stats
path: root/test/utils/cosmetics.py
diff options
context:
space:
mode:
authorAxel Souchet <0vercl0k@tuxfamily.org>2018-09-09 06:11:00 -0700
committerserpilliere <serpilliere@users.noreply.github.com>2018-09-09 15:11:00 +0200
commit8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9 (patch)
treedbf342089690704e89c10532b83d1d81709a49f4 /test/utils/cosmetics.py
parente61116884ac7879db08313542c6c28a8b00297c5 (diff)
downloadmiasm-8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9.tar.gz
miasm-8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9.zip
Adds Windows support and AppVeyor CI (#835)
* Get miasm to work on Windows, also add AppVeyor CI

* Fix gcc jitter on Linux

* Make the dse_crackme tests work on Windows

* calling build and then install is less confusing than install twice

* fix os.rename race condition on Windows

* clean it up

* Clean up after the unused cl.exe's artifacts

* Use is_win instead of an additional check

* Fix issue on Windows where 'w' and 'wb' modes are different

* Address review feedback

* setuptools is actually not required, so reverting
Diffstat (limited to 'test/utils/cosmetics.py')
-rw-r--r--test/utils/cosmetics.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/utils/cosmetics.py b/test/utils/cosmetics.py
index d870507b..e80e1f09 100644
--- a/test/utils/cosmetics.py
+++ b/test/utils/cosmetics.py
@@ -1,5 +1,7 @@
 import os
+import platform
 
+is_win = platform.system() == "Windows"
 
 def getTerminalSize():
     "Return the size of the terminal : COLUMNS, LINES"
@@ -37,6 +39,12 @@ colors = {"red": "\033[91;1m",
           "lightcyan": "\033[96m",
           "blue": "\033[94;1m"}
 
+if is_win:
+    colors = {"red": "",
+              "end": "",
+              "green": "",
+              "lightcyan": "",
+              "blue": ""}
 
 def write_colored(text, color, already_printed=0):
     text_colored = colors[color] + text + colors["end"]