Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceDai committed May 29, 2024
1 parent 0496091 commit 6741480
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions test/tools/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
How to generate test-data file for WPT tests?

Step 1: Please prepare resources JSON file which includes those tests
to test each operator of WebNN API without specified inputs and outputs
data.

Step 2: Implement generate test-data scripts

Step 3: Execute command for generating test-data files for WPT tests

```shell
node gen-operator-with-single-input.js resources\softsign.json
```

then, you can find two generated folders named 'test-data' and
'test-data-wpt'. There're raw test data as being
./test-data/softsign-data.json,
and raw WPT test-data file as being ./test-data-wpt/softsign.json.


You can manually modify some test data in
./test-data/softsign-data.json,
How to generate test-data file for WPT tests?

Step 1: Please prepare resources JSON file which includes those tests
to test each operator of WebNN API without specified inputs and outputs
data.

Step 2: Implement generate test-data scripts

Step 3: Execute command for generating test-data files for WPT tests.
```shell
node gen-operator-with-single-input.js resources\<operator>.json
```

Take an example for softsign operator tests:

```shell
node gen-operator-with-single-input.js resources\softsign.json
```

then, you can find two generated folders named 'test-data' and
'test-data-wpt'. There're raw test data as being
./test-data/softsign-data.json,
and raw WPT test-data file as being ./test-data-wpt/softsign.json.


You can manually modify some test data in
./test-data/softsign-data.json,
then execute Step 3, to update ./test-data-wpt/softsign.json.

0 comments on commit 6741480

Please sign in to comment.