You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

101 lines
3.2 KiB

  1. #URL="http://bucket.mit.edu:8080/nilmdb"
  2. URL="http://localhost/nilmdb"
  3. all: test
  4. test:
  5. ifneq ($(INSIDE_EMACS),)
  6. # Use the slightly more flexible script
  7. python3 setup.py build_ext --inplace
  8. python3 tests/runtests.py
  9. else
  10. # Let setup.py check dependencies, build stuff, and run the test
  11. python3 setup.py nosetests
  12. endif
  13. test_pipewatch:
  14. nilmtools/pipewatch.py -t 3 "seq 10 20" "seq 20 30"
  15. test_trainola:
  16. -nilmtool -u http://bucket/nilmdb remove -s min -e max \
  17. /sharon/prep-a-matches
  18. nilmtools/trainola.py "$$(cat extras/trainola-test-param.js)"
  19. test_trainola2:
  20. -nilmtool -u http://bucket/nilmdb remove -s min -e max \
  21. /sharon/prep-a-matches
  22. nilmtools/trainola.py "$$(cat extras/trainola-test-param-2.js)"
  23. test_trainola3:
  24. -nilmtool -u "http://bucket/nilmdb" destroy -R /test/jim
  25. nilmtool -u "http://bucket/nilmdb" create /test/jim uint8_3
  26. nilmtools/trainola.py "$$(cat extras/trainola-test-param-3.js)"
  27. nilmtool -u "http://bucket/nilmdb" extract /test/jim -s min -e max
  28. test_cleanup:
  29. nilmtools/cleanup.py -e extras/cleanup.cfg
  30. nilmtools/cleanup.py extras/cleanup.cfg
  31. test_insert:
  32. nilmtools/insert.py --skip --file --dry-run /foo/bar ~/data/20130311T2100.prep1.gz ~/data/20130311T2100.prep1.gz ~/data/20130311T2200.prep1.gz
  33. test_copy:
  34. nilmtools/copy_wildcard.py -U "http://nilmdb.com/bucket/" -D /lees*
  35. /tmp/raw.dat:
  36. octave --eval 'fs = 8000;' \
  37. --eval 't = (0:fs*10)*2*pi*60/fs;' \
  38. --eval 'raw = transpose([sin(t); 0.3*sin(3*t)+sin(t)]);' \
  39. --eval 'save("-ascii","/tmp/raw.dat","raw");'
  40. test_prep: /tmp/raw.dat
  41. -nilmtool destroy -R /test/raw
  42. -nilmtool destroy -R /test/sinefit
  43. -nilmtool destroy -R /test/prep
  44. nilmtool create /test/raw float32_2
  45. nilmtool create /test/sinefit float32_3
  46. nilmtool create /test/prep float32_8
  47. nilmtool insert -s '@0' -t -r 8000 /test/raw /tmp/raw.dat
  48. nilmtools/sinefit.py -a 0.5 -c 1 -s '@0' -e '@5000000' /test/raw /test/sinefit
  49. nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
  50. nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
  51. nilmtool extract -s min -e max /test/prep | head -20
  52. test_sinefit:
  53. make install >/dev/null 2>&1
  54. -nilmtool destroy -R /test/sinefit
  55. nilmtool create /test/sinefit float32_3
  56. nilmtools/sinefit.py -c 5 -s '2013/03/25 09:11:00' \
  57. -e '2013/03/25 10:11:00' /sharon/raw /test/sinefit
  58. nilmtool extract -s min -e max /test/sinefit | head -20
  59. test_decimate:
  60. -@nilmtool destroy /lees-compressor/no-leak/raw/4 || true
  61. -@nilmtool destroy /lees-compressor/no-leak/raw/16 || true
  62. -@nilmtool create /lees-compressor/no-leak/raw/4 float32_18 || true
  63. -@nilmtool create /lees-compressor/no-leak/raw/16 float32_18 || true
  64. time python nilmtools/decimate.py -s '2013-02-04 18:10:00' -e '2013-02-04 18:11:00' /lees-compressor/no-leak/raw/1 /lees-compressor/no-leak/raw/4
  65. python nilmtools/decimate.py -s '2013-02-04 18:10:00' -e '2013-02-04 18:11:00' /lees-compressor/no-leak/raw/4 /lees-compressor/no-leak/raw/16
  66. version:
  67. python setup.py version
  68. dist: sdist
  69. sdist:
  70. python setup.py sdist
  71. install:
  72. python setup.py install
  73. develop:
  74. python setup.py develop
  75. clean::
  76. find . -name '*pyc' | xargs rm -f
  77. rm -rf nilmtools.egg-info/ build/ MANIFEST.in
  78. gitclean::
  79. git clean -dXf
  80. .PHONY: all version dist sdist install clean gitclean test