Skip to content

Commit dc46206

Browse files
committed
Multi CPU testrun
1 parent 088f5cc commit dc46206

File tree

4 files changed

+615
-493
lines changed

4 files changed

+615
-493
lines changed

README.md

Lines changed: 26 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,27 @@ Testing SQL compabillity for [AlaSQL](https://github.com/agershun/alasql)
66
How?
77
----
88

9-
Go get markdown summery run npm test (will include starting node with garbagecollection set to true):
9+
Go get markdown summery run npm test :
1010

1111
npm test
1212

13-
Result will output to results.md
13+
Result will output to `results/results.md`
1414

1515

16-
----
17-
18-
**==> The rest of this file is probably outdated <==**
19-
20-
----
21-
22-
**To get more details** execute `run_raw.js` in the sqllogic folder. As the output is very big its suggested to direct output to a file and let the garbagecollection be initiated between the run of each file. To execute `run_raw.js` run node with the --expose-gc flag:
23-
24-
cd sqllogic
25-
node --expose-gc run_raw > results.log
2616

2717

2818
What?
2919
-----
3020

31-
The output of `run_raw.js` is the output of each test file followed by the total score. (so you can keep track on overall % of passed tests why its running)
21+
The output of `run.js` is the output of each test file followed by the total score. (so you can keep track on overall % of passed tests why its running)
3222

3323
There are about 2 million tests in the full test suite. Many of the tests will trigger the same kind of error - this is why the output will only print the same error the first time it comes forward. To have more examples it will randomly print errors even if it has been printes before. You can also choose to print all errors. Please see the config section in the run.js file.
3424

3525
Please note that the current version of the script **ONLY TESTS IF THE SQL CAN COMPILE** - not if the returned values are correct.
3626

3727
To make sure you are testing the lates stable release please run the following:
3828

39-
cd sqllogic && npm install alasql
29+
npm install alasql
4030

4131
Please see the config section of the `run` files to run tests on local version instead of npm version.
4232

@@ -62,6 +52,7 @@ Supported
6252

6353
- NULL values are rendered as "NULL". Empty strings are rendered as "(empty)". Within non-empty strings, all control characters and unprintable characters are rendered as "@".
6454

55+
- Implement verification of returned valued with sortorder set
6556

6657

6758

@@ -77,9 +68,6 @@ ToDo
7768
7869

7970

80-
- Implement verification of returned valued with sortorder set
81-
> The <sort-mode> argument is optional. If included, it must be one of "nosort", "rowsort", or "valuesort". The default is "nosort". In nosort mode, the results appear in exactly the order in which they were received from the database engine. The nosort mode should only be used on queries that have an ORDER BY clause or which only have a single row of result, since otherwise the order of results is undefined and might vary from one database engine to another. The "rowsort" mode gathers all output from the database engine then sorts it by rows on the client side. Sort comparisons use strcmp() on the rendered ASCII text representation of the values. Hence, "9" sorts after "10", not before. The "valuesort" mode works like rowsort except that it does not honor row groupings. Each individual result value is sorted on its own.
82-
8371
**Not ToDo**
8472
- Impelment mocha testframework (testresults does not get printed before all are done - so fills the memory)
8573

@@ -102,26 +90,26 @@ The output from run.js is structured the following way:
10290

10391
The output from a single testfile could look like this
10492

105-
-----------------------------
106-
Looking at ./test/index/between/1/slt_good_0.test
107-
108-
Ran 22 tests
109-
100% was OK
110-
0 was not
111-
./test/index/between/1/slt_good_0.test: 47ms
112-
113-
-----------------------------
114-
93+
> ### 11/32 [`./test/index/delete/1000/slt_good_0.test`](https://github.com/mathiasrw/alasql-logictest/blob/master/sqllogic/./test/index/delete/1000/slt_good_0.test)
94+
>
95+
> _Mimic sqlite_
96+
>
97+
> #### ★ Ran 11,924 tests as _sqlite_
98+
>
99+
> * 100% was OK
100+
>
101+
> `sqlite 11924 OK: ./test/index/delete/1000/slt_good_0.test`
102+
115103
It makes sense, as no errors was found. But it can also look like this:
116104

117-
-----------------------------
118-
Looking at ./test/evidence/slt_lang_update.test
119-
120-
Ran 25 tests
121-
96% was OK
122-
1 was not
123-
./test/evidence/slt_lang_update.test: 98ms
124-
125-
-----------------------------
126-
127-
making less sense as an error was found but was not printed. Because there are about 2 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run_x.js
105+
> ### 6/32 [`./test/index/commute/100/slt_good_0.test`](https://github.com/mathiasrw/alasql-logictest/blob/master/sqllogic/./test/index/commute/100/slt_good_0.test)
106+
>
107+
> _Mimic sqlite_
108+
>
109+
> #### ☓ Ran 10,122 tests as _sqlite_
110+
>
111+
> * 20 failed
112+
> * 99% was OK
113+
>
114+
115+
making less sense as an error was found but was not printed. Because there are about 2 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run.js

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"comparray": "^1.1.2",
2727
"md5": "^2.2.1",
2828
"numeral": "^1.5.3",
29+
"paralleljs": "^0.2.1",
2930
"pegjs": "^0.9.0",
3031
"sql.js": "^0.2.21",
3132
"yargs": "^3.31.0"

0 commit comments

Comments
 (0)