• R/O
  • SSH
  • HTTPS

iutest: Commit


Commit MetaInfo

Revision1420 (tree)
Zeit2020-08-13 08:42:28
Autorsrz_zumix

Log Message

Merge pull request #494 from srz-zumix/fix/printto_variant_test_for_gtest

Fix/printto variant test for gtest
git@ed6bf5d971a9520dc4118bdfcb509916e86d6255
https://github.com/srz-zumix/iutest/commit/ed6bf5d971a9520dc4118bdfcb509916e86d6255


report only master,develop build

git@418d8098040393776d1e152b003243ece3445cad


fix

git@d8f67ec87b385265bc9503ab569df3ecc191615e


support make (#491)

* support make

* fix nil

* error case

* fix wercker wandbox pipeline

* update use main

* update README [ci skip]
git@ff7c8e7852fe57b807b75519d64bcd7373fc0407


fix packaging

git@cdef8a8dae8418304b1e14c5d9d74c91861a6371


checkout@v2

git@0e011674ec6b1a56b636191b002cdbce83c69908


fix tags

git@2357b7fe53aae0a2673d32cef08c82bd534b9bd1


tags trigger

git@92f95b00afc10d727da40ea8d20d35574019f53e

Ändern Zusammenfassung

Diff

--- trunk/README.md (revision 1419)
+++ trunk/README.md (revision 1420)
@@ -144,7 +144,7 @@
144144 |[Semaphore 2.0](https://semaphoreci.com/)|[![Semaphore 2.0 Build Status](https://srz-zumix.semaphoreci.com/badges/iutest/branches/master.svg)](https://srz-zumix.semaphoreci.com/projects/iutest)|[![Semaphore 2.0 Build Status](https://srz-zumix.semaphoreci.com/badges/iutest/branches/develop.svg)](https://srz-zumix.semaphoreci.com/projects/iutest)|Scan-build, Basic test, sample run|
145145 |[Shippable](https://shippable.com/)|[![Shippable Run Status](https://api.shippable.com/projects/541904d2ac22859af743f867/badge?branch=master)](https://app.shippable.com/github/srz-zumix/iutest)|[![Run Status](https://api.shippable.com/projects/541904d2ac22859af743f867/badge?branch=develop)](https://app.shippable.com/github/srz-zumix/iutest)|CentOS gcc/clang Baisc test|
146146 |[Travis CI](https://travis-ci.com/)|[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=master)](https://travis-ci.com/srz-zumix/iutest)|[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=develop)](https://travis-ci.com/srz-zumix/iutest)|Basic tests, Google Test compatibility, Coverage, Coverity-scan|
147-|[Wercker](https://www.wercker.com/)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/master "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/develop "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|gtest compatible test for released versions / gtest version detect test|
147+|[Wercker](https://www.wercker.com/)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/master "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/develop "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|gtest compatible test for released versions / gtest version detect test, iuwandbox make build|
148148
149149 Basic test
150150
--- trunk/test/printers_tests.cpp (revision 1419)
+++ trunk/test/printers_tests.cpp (revision 1420)
@@ -541,7 +541,7 @@
541541 IUTEST_PRINTTOSTRING_EQ(ck, v);
542542 IUTEST_STREAMOUT_CHECK(v);
543543 }
544-#if IUTEST_HAS_EXCEPTIONS
544+#if IUTEST_HAS_EXCEPTIONS && !defined(IUTEST_USE_GTEST)
545545 {
546546 PrintToLogChecker ck("valueless_by_exception");
547547 ::std::variant<int, float, AlwaysThrow> v = 0.2f;
--- trunk/tools/wandbox/Makefile (revision 1419)
+++ trunk/tools/wandbox/Makefile (revision 1420)
@@ -57,6 +57,9 @@
5757 test-make: ../../test/syntax_tests.cpp Makefile
5858 python iuwandbox.py $< -c gcc-head -f"-DIUTEST_USE_MAIN" --encoding utf-8-sig $(EXPAND_INCLUDE) --make
5959
60+save-make: ../../test/syntax_tests.cpp Makefile
61+ python iuwandbox.py $< -c gcc-head -f"-DIUTEST_USE_MAIN" --encoding utf-8-sig $(EXPAND_INCLUDE) --make -s
62+
6063 boost: ../../test/syntax_tests.cpp Makefile
6164 python iuwandbox.py $< -c $(WANDBOX_COMPILER) --boost 1.60 -f"-DIUTEST_USE_MAIN" --encoding utf-8-sig $(EXPAND_INCLUDE) --verbose --dryrun
6265
--- trunk/tools/wandbox/iuwandbox.py (revision 1419)
+++ trunk/tools/wandbox/iuwandbox.py (revision 1420)
@@ -41,7 +41,7 @@
4141 '-v',
4242 '--version',
4343 action='version',
44- version=u'%(prog)s version 7.0'
44+ version=u'%(prog)s version 7.1'
4545 )
4646 parser.add_argument(
4747 '--list-compiler',
@@ -480,12 +480,23 @@
480480 for x in raw_options:
481481 colist.extend(re.split('\s(?=-)', x.strip('"')))
482482 if options.iutest_use_main:
483- colist.append('-DIUTEST_USE_MAIN')
483+ if len(options.code) < 2:
484+ colist.append('-DIUTEST_USE_MAIN')
484485 if '-D__WANDBOX__' not in colist:
485486 colist.append('-D__WANDBOX__')
486487 return colist
487488
488489
490+def get_compiler_exec(compiler):
491+ if 'gcc' in compiler:
492+ return 'g++'
493+ if 'clang' in compiler:
494+ return 'clang++'
495+ if 'zapcc' in compiler:
496+ return 'zapcc++'
497+ return None
498+
499+
489500 # run wandbox (makefile)
490501 def run_wandbox_make(main_filepath, code, includes, impliments, options):
491502 with Wandbox() as w:
@@ -504,6 +515,11 @@
504515 rolist.extend(opt.split())
505516
506517 makefile = '#!/bin/make\n# generate makefile by iuwandbox.py\n'
518+ cxx = get_compiler_exec(options.compiler)
519+ if cxx is None:
520+ print('failed: invalid compiler...')
521+ sys.exit(1)
522+ makefile += '\nCXX=/opt/wandbox/' + options.compiler + '/bin/' + cxx
507523 makefile += '\nCXXFLAGS+='
508524 for opt in colist:
509525 makefile += opt + ' '
@@ -675,8 +691,12 @@
675691 includes = {}
676692 included_files = {}
677693 impliments = {}
678- code = make_code(main_filepath, options.encoding, options.expand_include, includes, included_files)
694+ code = ""
695+ if len(options.code) > 1 and options.iutest_use_main:
696+ code += '#define IUTEST_USE_MAIN\n'
697+ code += make_code(main_filepath, options.encoding, options.expand_include, includes, included_files)
679698
699+
680700 for filepath_ in options.code[1:]:
681701 filepath = filepath_.strip()
682702 impliments[os.path.basename(filepath)] = make_code(filepath, options.encoding, options.expand_include, includes, included_files)
--- trunk/wercker.yml (revision 1419)
+++ trunk/wercker.yml (revision 1420)
@@ -63,7 +63,8 @@
6363 name: setup
6464 code: |
6565 export PYTHONDONTWRITEBYTECODE=1
66- 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"
66+ export IUWANDBOX_COMMANDLINE_OPTION="-f"-Werror" --encoding utf-8-sig --expand-include --verbose --check-config --retry-wait 180 --iutest-use-main"
67+ if [ "${IUWANDBOX_TARGET_SRC+x}" ]; then export IUWANDBOX_TARGET_SRC="../../test/syntax_tests.cpp"; fi
6768
6869 - script: &experimental
6970 name: experimental setup
@@ -76,7 +77,7 @@
7677 cd tools/wandbox
7778 for compiler in ${IUWANDBOX_COMPILER}
7879 do
79- python ./iuwandbox.py ${IUWANDBOX_EXPERIMENTAL_OPTION} ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler --std "c++${IUWANDBOX_CPPVER}" ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
80+ python ./iuwandbox.py ${IUWANDBOX_EXPERIMENTAL_OPTION} ${IUWANDBOX_COMMANDLINE_OPTION} -c $compiler --std "c++${IUWANDBOX_CPPVER}" ${IUWANDBOX_TARGET_SRC} ${IUWANDBOX_ADD_OPTION} ${IUWANDBOX_STDC_ADD_OPTION};
8081 done
8182
8283 # - script: &gnucpp
Show on old repository browser