Compare commits
10 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0256eb9a45 | ||
|
|
a7b65aefbf | ||
|
|
5f476506bd | ||
|
|
f87868d8e3 | ||
|
|
3ec5466445 | ||
|
|
1d01b831aa | ||
|
|
0d2e791e82 | ||
|
|
71fe947ff5 | ||
|
|
beb2a595f1 | ||
|
|
0fbc3c0c84 |
6 changed files with 143 additions and 29 deletions
106
.appveyor.yml
106
.appveyor.yml
|
|
@ -1,11 +1,5 @@
|
||||||
version: '{build}'
|
version: '{build}'
|
||||||
|
|
||||||
# for Appveyor CI (windows)
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
os: Windows Server 2012 R2
|
os: Windows Server 2012 R2
|
||||||
|
|
||||||
clone_folder: c:\projects\STEPcode
|
clone_folder: c:\projects\STEPcode
|
||||||
|
|
@ -59,6 +53,106 @@ test_script:
|
||||||
- cmd: cd c:\projects\STEPcode\build
|
- cmd: cd c:\projects\STEPcode\build
|
||||||
- cmd: echo excluding test_inverse_attr3, which hangs
|
- cmd: echo excluding test_inverse_attr3, which hangs
|
||||||
- cmd: ctest -j1 . -C Debug -E test_inverse_attr3 --output-on-failure
|
- cmd: ctest -j1 . -C Debug -E test_inverse_attr3 --output-on-failure
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
||||||
|
|
||||||
# - cmd: grep -niB20 "Test Failed" Testing/Temporary/LastTest.log
|
# - cmd: grep -niB20 "Test Failed" Testing/Temporary/LastTest.log
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@ language: cpp
|
||||||
compiler:
|
compiler:
|
||||||
- clang
|
- clang
|
||||||
script: mkdir build && cd build && cmake .. -DSC_ENABLE_TESTING=ON && make -j3 && ctest -j2 --output-on-failure
|
script: mkdir build && cd build && cmake .. -DSC_ENABLE_TESTING=ON && make -j3 && ctest -j2 --output-on-failure
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
notifications:
|
notifications:
|
||||||
irc: "chat.freenode.net#stepcode"
|
irc: "chat.freenode.net#stepcode"
|
||||||
email: scl-dev@groups.google.com
|
email: scl-dev@groups.google.com
|
||||||
|
|
@ -14,6 +11,3 @@ notifications:
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- os: osx
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ std::cout << \"1s is \"<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
set( TEST_NULLPTR "
|
set( TEST_NULLPTR "
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
std::nullptr_t f() {return nullptr;}
|
std::nullptr_t f() {return nullptr;}
|
||||||
int main() {return !!f();}
|
int main() {return !(f() == f());}
|
||||||
" )
|
" )
|
||||||
cmake_push_check_state()
|
cmake_push_check_state()
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ instancesLoaded_t * lazyFileReader::getHeaderInstances() {
|
||||||
}
|
}
|
||||||
|
|
||||||
lazyFileReader::lazyFileReader( std::string fname, lazyInstMgr * i, fileID fid ): _fileName( fname ), _parent( i ), _fileID( fid ) {
|
lazyFileReader::lazyFileReader( std::string fname, lazyInstMgr * i, fileID fid ): _fileName( fname ), _parent( i ), _fileID( fid ) {
|
||||||
_file.open( _fileName.c_str() );
|
_file.open( _fileName.c_str(), std::ios::binary );
|
||||||
_file.imbue( std::locale::classic() );
|
_file.imbue( std::locale::classic() );
|
||||||
_file.unsetf( std::ios_base::skipws );
|
_file.unsetf( std::ios_base::skipws );
|
||||||
assert( _file.is_open() && _file.good() );
|
assert( _file.is_open() && _file.good() );
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ void ErrorDescriptor::PrependToUserMsg( const char * msg ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorDescriptor::AppendToUserMsg( const char c ) {
|
void ErrorDescriptor::AppendToUserMsg( const char c ) {
|
||||||
_userMsg.append( &c );
|
_userMsg.push_back( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorDescriptor::AppendToUserMsg( const char * msg ) {
|
void ErrorDescriptor::AppendToUserMsg( const char * msg ) {
|
||||||
|
|
@ -147,7 +147,7 @@ void ErrorDescriptor::PrependToDetailMsg( const char * msg ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorDescriptor::AppendToDetailMsg( const char c ) {
|
void ErrorDescriptor::AppendToDetailMsg( const char c ) {
|
||||||
_detailMsg.append( &c );
|
_detailMsg.push_back( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorDescriptor::AppendToDetailMsg( const char * msg ) {
|
void ErrorDescriptor::AppendToDetailMsg( const char * msg ) {
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,9 @@
|
||||||
#include "express/info.h"
|
#include "express/info.h"
|
||||||
#include "express/linklist.h"
|
#include "express/linklist.h"
|
||||||
|
|
||||||
|
#if defined( _WIN32 ) || defined ( __WIN32__ )
|
||||||
|
# define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
bool __ERROR_buffer_errors = false;
|
bool __ERROR_buffer_errors = false;
|
||||||
const char * current_filename = "stdin";
|
const char * current_filename = "stdin";
|
||||||
|
|
@ -112,6 +115,7 @@ static struct heap_element {
|
||||||
static int ERROR_with_lines = 0; /**< number of warnings & errors that have occurred with a line number */
|
static int ERROR_with_lines = 0; /**< number of warnings & errors that have occurred with a line number */
|
||||||
static char * ERROR_string;
|
static char * ERROR_string;
|
||||||
static char * ERROR_string_base;
|
static char * ERROR_string_base;
|
||||||
|
static char * ERROR_string_end;
|
||||||
|
|
||||||
static bool ERROR_unsafe = false;
|
static bool ERROR_unsafe = false;
|
||||||
static jmp_buf ERROR_safe_env;
|
static jmp_buf ERROR_safe_env;
|
||||||
|
|
@ -119,6 +123,34 @@ static jmp_buf ERROR_safe_env;
|
||||||
|
|
||||||
#define error_file stderr /**< message buffer file */
|
#define error_file stderr /**< message buffer file */
|
||||||
|
|
||||||
|
static int ERROR_vprintf( const char *format, va_list ap ) {
|
||||||
|
int result = snprintf( ERROR_string, ERROR_string_end - ERROR_string, format, ap );
|
||||||
|
if(result < 0) {
|
||||||
|
ERROR_string = ERROR_string_end;
|
||||||
|
} else if(result > (ERROR_string_end - ERROR_string)) {
|
||||||
|
ERROR_string = ERROR_string_end;
|
||||||
|
} else {
|
||||||
|
ERROR_string = ERROR_string + result;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ERROR_printf( const char *format, ... ) {
|
||||||
|
int result;
|
||||||
|
va_list ap;
|
||||||
|
va_start( ap, format );
|
||||||
|
result = ERROR_vprintf( format, ap );
|
||||||
|
va_end( ap );
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ERROR_nexterror() {
|
||||||
|
if( ERROR_string == ERROR_string_end ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ERROR_string++;
|
||||||
|
}
|
||||||
|
|
||||||
/** Initialize the Error module */
|
/** Initialize the Error module */
|
||||||
void ERRORinitialize( void ) {
|
void ERRORinitialize( void ) {
|
||||||
ERROR_subordinate_failed =
|
ERROR_subordinate_failed =
|
||||||
|
|
@ -127,6 +159,7 @@ void ERRORinitialize( void ) {
|
||||||
ERRORcreate( "%s, expecting %s in %s %s", SEVERITY_EXIT );
|
ERRORcreate( "%s, expecting %s in %s %s", SEVERITY_EXIT );
|
||||||
|
|
||||||
ERROR_string_base = ( char * )sc_malloc( ERROR_MAX_SPACE );
|
ERROR_string_base = ( char * )sc_malloc( ERROR_MAX_SPACE );
|
||||||
|
ERROR_string_end = ERROR_string_base + ERROR_MAX_SPACE;
|
||||||
ERROR_start_message_buffer();
|
ERROR_start_message_buffer();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -377,20 +410,14 @@ va_dcl {
|
||||||
heap[child].msg = ERROR_string;
|
heap[child].msg = ERROR_string;
|
||||||
|
|
||||||
if( what->severity >= SEVERITY_ERROR ) {
|
if( what->severity >= SEVERITY_ERROR ) {
|
||||||
sprintf( ERROR_string, "%s:%d: --ERROR PE%03d: ", sym->filename, sym->line, what->serial );
|
ERROR_printf( "%s:%d: --ERROR PE%03d: ", sym->filename, sym->line, what->serial );
|
||||||
ERROR_string += strlen( ERROR_string );
|
ERROR_vprintf( what->message, args );
|
||||||
vsprintf( ERROR_string, what->message, args );
|
ERROR_nexterror();
|
||||||
ERROR_string += strlen( ERROR_string );
|
|
||||||
*ERROR_string++ = '\n';
|
|
||||||
*ERROR_string++ = '\0';
|
|
||||||
ERRORoccurred = true;
|
ERRORoccurred = true;
|
||||||
} else {
|
} else {
|
||||||
sprintf( ERROR_string, "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
ERROR_printf( "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
||||||
ERROR_string += strlen( ERROR_string );
|
ERROR_vprintf( what->message, args );
|
||||||
vsprintf( ERROR_string, what->message, args );
|
ERROR_nexterror();
|
||||||
ERROR_string += strlen( ERROR_string );
|
|
||||||
*ERROR_string++ = '\n';
|
|
||||||
*ERROR_string++ = '\0';
|
|
||||||
}
|
}
|
||||||
if( what->severity >= SEVERITY_EXIT ||
|
if( what->severity >= SEVERITY_EXIT ||
|
||||||
ERROR_string + ERROR_MAX_STRLEN > ERROR_string_base + ERROR_MAX_SPACE ||
|
ERROR_string + ERROR_MAX_STRLEN > ERROR_string_base + ERROR_MAX_SPACE ||
|
||||||
|
|
@ -410,7 +437,6 @@ va_dcl {
|
||||||
ERRORoccurred = true;
|
ERRORoccurred = true;
|
||||||
} else {
|
} else {
|
||||||
fprintf( error_file, "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
fprintf( error_file, "%s:%d: WARNING PW%03d: ", sym->filename, sym->line, what->serial );
|
||||||
ERROR_string += strlen( ERROR_string ) + 1;
|
|
||||||
vfprintf( error_file, what->message, args );
|
vfprintf( error_file, what->message, args );
|
||||||
fprintf( error_file, "\n" );
|
fprintf( error_file, "\n" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue