Browse Source

Add test case for bad trainola detections

tags/nilmtools-1.4.4
Jim Paris 8 years ago
parent
commit
d2853bdb0e
2 changed files with 50 additions and 3 deletions
  1. +10
    -3
      Makefile
  2. +40
    -0
      extras/trainola-test-param-3.js

+ 10
- 3
Makefile View File

@@ -8,7 +8,7 @@ else
@echo "Try 'make install'"
endif

test: test_insert
test: test_trainola3

test_pipewatch:
nilmtools/pipewatch.py -t 3 "seq 10 20" "seq 20 30"
@@ -16,11 +16,18 @@ test_pipewatch:
test_trainola:
-nilmtool -u http://bucket/nilmdb remove -s min -e max \
/sharon/prep-a-matches
nilmtools/trainola.py "$$(cat extras/trainola-test-param-2.js)"
nilmtools/trainola.py "$$(cat extras/trainola-test-param.js)"

test_trainola2:
-nilmtool -u http://bucket/nilmdb remove -s min -e max \
/sharon/prep-a-matches
nilmtools/trainola.py "$$(cat extras/trainola-test-param.js)"
nilmtools/trainola.py "$$(cat extras/trainola-test-param-2.js)"

test_trainola3:
-nilmtool -u "http://bucket/nilmdb" destroy -R /test/jim
nilmtool -u "http://bucket/nilmdb" create /test/jim uint8_3
nilmtools/trainola.py "$$(cat extras/trainola-test-param-3.js)"
nilmtool -u "http://bucket/nilmdb" extract /test/jim -s min -e max

test_cleanup:
nilmtools/cleanup.py -e extras/cleanup.cfg


+ 40
- 0
extras/trainola-test-param-3.js View File

@@ -0,0 +1,40 @@
{
"url": "http://bucket/nilmdb",
"stream": "/sharon/prep-a",
"dest_stream": "/test/jim",
"start": 1364184839901599,
"end": 1364184942407610.2,

"columns": [ { "index": 0, "name": "P1" } ],

"exemplars": [
{
"name": "A - True DBL Freezer ON",
"dest_column": 0,
"url": "http://bucket/nilmdb",
"stream": "/sharon/prep-a",
"columns": [ { "index": 0, "name": "P1" } ],
"start": 1365277707649000,
"end": 1365277710705000
},
{
"name": "A - Boiler 1 Fan OFF",
"dest_column": 1,
"url": "http://bucket/nilmdb",
"stream": "/sharon/prep-a",
"columns": [ { "index": 0, "name": "P1" } ],
"start": 1364188370735000,
"end": 1364188373819000
},
{
"name": "A - True DBL Freezer OFF",
"dest_column": 2,
"url": "http://bucket/nilmdb",
"stream": "/sharon/prep-a",
"columns": [ { "index": 0, "name": "P1" } ],
"start": 1365278087982000,
"end": 1365278089340000
}
]
}


Loading…
Cancel
Save