• R/O
  • SSH
  • HTTPS

iutest: Commit


Commit MetaInfo

Revision1410 (tree)
Zeit2020-06-04 08:46:56
Autorsrz_zumix

Log Message

Merge remote-tracking branch 'origin/develop'

git@3afc4249027f5761960bada2d5dcfb9b8525582a
https://github.com/srz-zumix/iutest/commit/3afc4249027f5761960bada2d5dcfb9b8525582a


Merge remote-tracking branch 'origin/develop'

git@fde1faabbbd8c631abd5611608f253500172e7f4


fix vcperf/vcvars.bat

git@f695b6f83c1910fb1fda044bba0787c976f93d6f


vcperf (#457)

git@67983f0868f4e184a9abfec664780ee9951a2114


fused src compress (#456)

* fused src compress

* fix lint
git@c853124a8cbbb196415e63c1239ebb594793f17a

Ändern Zusammenfassung

Diff

--- trunk/include/internal/iutest_compiler.hpp (revision 1409)
+++ trunk/include/internal/iutest_compiler.hpp (revision 1410)
@@ -382,7 +382,7 @@
382382 // private destractor = default is not works in gcc 4.5 - 4.6
383383 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
384384 # define IUTEST_HAS_DEFAULT_FUNCTIONS 1
385-# if (_MSV_VER <= 1800) && !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
385+# if !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
386386 # define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
387387 # endif
388388 # elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
--- trunk/include/internal/iutest_debug.hpp (revision 1409)
+++ trunk/include/internal/iutest_debug.hpp (revision 1410)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2011-2019, Takazumi Shirayanagi\n
9+ * Copyright (C) 2011-2020, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -19,10 +19,10 @@
1919 // iutest 自体のデバッグ用定義
2020
2121 #if defined(_MSC_VER) && !defined(IUTEST_OS_WINDOWS_MOBILE)
22+# include <streambuf>
2223 # include <crtdbg.h>
2324 # include <xlocnum>
2425 # include <xtree>
25-# include <streambuf>
2626 # ifndef _DEBUG_NEW_
2727 # define _DEBUG_NEW_ new ( _NORMAL_BLOCK , __FILE__, __LINE__)
2828 # pragma push_macro("new")
--- trunk/include/util/iutest_util_menu.hpp (revision 1409)
+++ trunk/include/util/iutest_util_menu.hpp (revision 1410)
@@ -20,8 +20,8 @@
2020 #include "iutest_util_tests.hpp"
2121
2222 #if defined(IUTEST_OS_WINDOWS)
23+#include <map>
2324 #include <windows.h>
24-#include <map>
2525
2626 namespace iuutil
2727 {
--- trunk/tools/VisualStudio/vcperf.bat (nonexistent)
+++ trunk/tools/VisualStudio/vcperf.bat (revision 1410)
@@ -0,0 +1,7 @@
1+@echo off
2+
3+which vcperf.exe > nul 2>&1
4+if errorlevel 1 (
5+ call %~dp0\vcvars.bat 16.0 x64
6+)
7+vcperf.exe %*
--- trunk/tools/VisualStudio/vcvars.bat (nonexistent)
+++ trunk/tools/VisualStudio/vcvars.bat (revision 1410)
@@ -0,0 +1,35 @@
1+@echo off
2+
3+if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
4+ goto from_envvar
5+)
6+
7+if "%~1"=="" (
8+ echo %~nx0 "<vs version(e.g. 16.0)>" [vcvarsall options...]
9+ exit 1
10+)
11+SET VSVER=%1
12+SET ARGS=
13+
14+:check
15+shift
16+if "%~1"=="" goto final
17+set ARGS=%ARGS% %1
18+goto check
19+:final
20+
21+which vswhere > nul 2>&1
22+if errorlevel 1 SET PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\
23+vswhere -version %VSVER% -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find **/vcvarsall.bat > tmp.txt
24+SET /p VCVARS=<tmp.txt
25+del /F tmp.txt
26+echo %VCVARS%
27+echo %ARGS%
28+
29+call "%VCVARS%" %ARGS%
30+
31+goto :EOF
32+
33+:from_envvar
34+echo not impl
35+
--- trunk/tools/fused/iutest_pp_strip.py (revision 1409)
+++ trunk/tools/fused/iutest_pp_strip.py (revision 1410)
@@ -23,6 +23,7 @@
2323 RE_PPELIF = re.compile('#\s*elif\s*(.*)$')
2424 RE_PPELSE = re.compile('#\s*else\s*$')
2525 RE_PPENDIF = re.compile('#\s*endif')
26+RE_AND = re.compile('and')
2627 RE_CPP_COMMENT = re.compile('^//.*')
2728 RE_SYSTEM_INCLUDE_REGEX = re.compile(r'^\s*#\s*include\s*<(.*)>')
2829
@@ -245,9 +246,8 @@
245246 return r0
246247 return -1
247248
248- def __eval_ppif(self, expr):
249- expand = self.__expand_ppif_macro(expr)
250- expand_expr = re.sub(r'([0-9])+L', r'\1', expand)
249+ def __eval_expanded_expr(self, expand_expr):
250+ error = None
251251 try:
252252 r = eval(expand_expr)
253253 if r:
@@ -255,6 +255,25 @@
255255 else:
256256 return (0, '0')
257257 except Exception as e:
258+ error = e
259+
260+ expand = expand_expr
261+ if 'or' not in expand:
262+ for expr in RE_AND.split(expand):
263+ try:
264+ r = eval(expr)
265+ if not r:
266+ return (0, '0')
267+ except Exception as e:
268+ error = e
269+ raise error
270+
271+ def __eval_ppif(self, expr):
272+ expand = self.__expand_ppif_macro(expr)
273+ expand_expr = re.sub(r'([0-9])+L', r'\1', expand)
274+ try:
275+ return self.__eval_expanded_expr(expand_expr)
276+ except Exception as e:
258277 r = -1
259278 if len(expand.split()) > 1:
260279 # r = self.__eval_ppif_unknown_defined(expand_expr)
@@ -375,10 +394,10 @@
375394 m = RE_SYSTEM_INCLUDE_REGEX.match(line)
376395 if m:
377396 path = m.group(1)
378- if path in self.included_path[-1]:
379- return False
380- else:
381- self.included_path[-1].append(path)
397+ for include_paths in self.included_path:
398+ if path in include_paths:
399+ return False
400+ self.included_path[-1].append(path)
382401 return True
383402
384403 def __reduction(self, line):
--- trunk/tools/fused/iuwandbox_pp.py (revision 1409)
+++ trunk/tools/fused/iuwandbox_pp.py (revision 1410)
@@ -42,6 +42,7 @@
4242 'COMPILER_ICC': None,
4343 '_MSC_VER': None,
4444 '_MSC_FULL_VER': None,
45+ '_MSVC_LANG': None,
4546 '_WIN32': None,
4647 'WIN32': None,
4748 '__WIN32__': None,
@@ -48,6 +49,9 @@
4849 'WINAPI_FAMILY': None,
4950 '__AFX_H__': None,
5051 '__MWERKS__': None,
52+ '__FreeBSD__': None,
53+ 'sun': None,
54+ '__sun': None,
5155 'IUTEST_OS_WINDOWS': None,
5256 'IUTEST_OS_WINDOWS_MINGW': None,
5357 'IUTEST_OS_WINDOWS_MOBILE': None,
@@ -94,6 +98,12 @@
9498 'IUTEST_HAS_MINIDUMP': '0',
9599 'IUTEST_HAS_STRSTREAM': '0',
96100 'IUTEST_HAS_STRINGSTREAM': '1',
101+ 'IUTEST_HAS_IOMANIP': '1',
102+ 'IUTEST_HAS_CTIME': '1',
103+ 'IUTEST_HAS_GETTIMEOFDAY': '1',
104+ 'IUTEST_HAS_HDR_SYSTIME': '1',
105+ 'IUTEST_HAS_FOPEN': '1',
106+ 'IUTEST_HAS_FILE_STAT': '1',
97107 'IUTEST_HAS_CLASS_MEMBER_TEMPLATE_SPECIALIZATION': '0',
98108 'IUTEST_HAS_GENERIC': '0',
99109 'IUTEST_HAS_MEMORY_SANITIZER': '0',
--- trunk/wercker.yml (revision 1409)
+++ trunk/wercker.yml (revision 1410)
@@ -26,7 +26,7 @@
2626 # http://devcenter.wercker.com/docs/steps/index.html
2727 steps:
2828 # A step that executes `pip install` command.
29- - pip-install:
29+ - pip-install: &pip-install
3030 requirements_file: ""
3131 packages_list: "requests"
3232
@@ -50,63 +50,62 @@
5050
5151 wandbox:
5252 steps:
53- - pip-install:
54- requirements_file: ""
55- packages_list: "requests"
56-
57- - script:
53+ - pip-install: *pip-install
54+ - script: &make-fused
5855 name: make fused
5956 code: |
6057 make -C tools/fused
6158
62- - script:
59+ - script: &setup
6360 name: setup
6461 code: |
6562 export PYTHONDONTWRITEBYTECODE=1
6663 export IUWANDBOX_COMMANDLINE_OPTION="../../test/syntax_tests.cpp -f"-DIUTEST_USE_MAIN=1" -f"-Werror" --encoding utf-8-sig --expand-include --verbose --check-config --retry-wait 180"
6764
68- - script:
65+ - script: &experimental
66+ name: experimental setup
67+ code: |
68+ export IUWANDBOX_EXPERIMENTAL_OPTION="--iutest-use-wandbox-min"
69+
70+ - script: &cpp
6971 name: c++
7072 code: |
7173 cd tools/wandbox
7274 for compiler in ${IUWANDBOX_COMPILER}
7375 do
74- python ./iuwandbox.py --iutest-use-wandbox-min ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler --std "c++${IUWANDBOX_CPPVER}" ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
76+ python ./iuwandbox.py ${IUWANDBOX_EXPERIMENTAL_OPTION} ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler --std "c++${IUWANDBOX_CPPVER}" ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
7577 done
7678
77- - script:
79+ - script: &gnucpp
7880 name: gnuc++
7981 code: |
8082 cd tools/wandbox
8183 for compiler in ${IUWANDBOX_COMPILER}
8284 do
83- python ./iuwandbox.py --iutest-use-wandbox-min ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler --std "gnu++${IUWANDBOX_CPPVER}" ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
85+ python ./iuwandbox.py ${IUWANDBOX_EXPERIMENTAL_OPTION} ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler --std "gnu++${IUWANDBOX_CPPVER}" ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
8486 done
8587
88+wandbox-no-experimental:
89+ steps:
90+ - pip-install: *pip-install
91+ - script: *make-fused
92+ - script: *setup
93+ - script: *cpp
94+ - script: *gnucpp
95+
8696 wandbox-all-compiler:
8797 steps:
88- - pip-install:
89- requirements_file: ""
90- packages_list: "requests"
91-
98+ - pip-install: *pip-install
99+ - script: *make-fused
100+ - script: *setup
101+ - script: *experimental
92102 - script:
93- name: make fused
94- code: |
95- make -C tools/fused
96-
97- - script:
98- name: setup
99- code: |
100- export PYTHONDONTWRITEBYTECODE=1
101- export IUWANDBOX_COMMANDLINE_OPTION="../../test/syntax_tests.cpp -f"-DIUTEST_USE_MAIN=1" -f"-Werror" --encoding utf-8-sig --expand-include --verbose --check-config --retry-wait 180"
102-
103- - script:
104103 name: all-compiler
105104 code: |
106105 cd tools/wandbox
107106 for compiler in $(shell python iuwandbox.py --list-compiler)
108107 do
109- python ./iuwandbox.py ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
108+ python ./iuwandbox.py ${IUWANDBOX_EXPERIMENTAL_OPTION} ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
110109 done
111110
112111 nothing:
Show on old repository browser