@@ -6665,37 +6665,23 @@ def test_freetype(self):
6665
6665
@no_asan ('local count too large for VMs' )
6666
6666
@no_ubsan ('local count too large for VMs' )
6667
6667
@is_slow_test
6668
- def test_sqlite (self ):
6668
+ @parameterized ({
6669
+ 'single' : (False ,),
6670
+ 'pthreads' : (True ,),
6671
+ })
6672
+ def test_sqlite (self , use_pthreads ):
6673
+ if use_pthreads :
6674
+ self .set_setting ('USE_PTHREADS' )
6675
+ self .setup_node_pthreads ()
6669
6676
self .set_setting ('EXPORTED_FUNCTIONS' , ['_main' , '_sqlite3_open' , '_sqlite3_close' , '_sqlite3_exec' , '_sqlite3_free' ])
6670
6677
if '-g' in self .emcc_args :
6671
6678
print ("disabling inlining" ) # without registerize (which -g disables), we generate huge amounts of code
6672
6679
self .set_setting ('INLINING_LIMIT' )
6673
6680
6674
- # newer clang has a warning for implicit conversions that lose information,
6675
- # which happens in sqlite (see #9138)
6676
- self .emcc_args += ['-Wno-implicit-int-float-conversion' ]
6677
- # newer clang warns about "suspicious concatenation of string literals in an
6678
- # array initialization; did you mean to separate the elements with a comma?"
6679
- self .emcc_args += ['-Wno-string-concatenation' ]
6680
- # ignore unknown flags, which lets the above flags be used on github CI
6681
- # before the LLVM change rolls in (the same LLVM change that adds the
6682
- # warning also starts to warn on it)
6683
- self .emcc_args += ['-Wno-unknown-warning-option' ]
6684
- self .emcc_args += ['-Wno-pointer-bool-conversion' ]
6685
-
6686
- self .emcc_args += ['-I' + test_file ('third_party/sqlite' )]
6687
-
6688
- src = '''
6689
- #define SQLITE_DISABLE_LFS
6690
- #define LONGDOUBLE_TYPE double
6691
- #define SQLITE_INT64_TYPE long long int
6692
- #define SQLITE_THREADSAFE 0
6693
- '''
6694
- src += read_file (test_file ('third_party/sqlite/sqlite3.c' ))
6695
- src += read_file (test_file ('sqlite/benchmark.c' ))
6681
+ self .emcc_args += ['-sUSE_SQLITE3' ]
6682
+ src = read_file (test_file ('sqlite/benchmark.c' ))
6696
6683
self .do_run (src ,
6697
6684
read_file (test_file ('sqlite/benchmark.txt' )),
6698
- includes = [test_file ('sqlite' )],
6699
6685
force_c = True )
6700
6686
6701
6687
@needs_make ('mingw32-make' )
0 commit comments