run_tests.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @echo off
  2. cd .\tests
  3. echo clean the directories (if they exist)
  4. if exist .\work del /f /s /q .\work
  5. if exist .\results del /f /s /q .\results
  6. echo make the directories (if they do not)
  7. if not exist .\work md .\work
  8. if not exist .\results md .\results
  9. echo unpack openaccess.accda if it does not exist in ..\
  10. if not exist ..\OpenAccess.accda unzip ..\OpenAccess.zip
  11. echo prepare files
  12. unzip .\initial\project0.zip -d .\work
  13. unzip .\initial\db.zip -d .\work
  14. unzip .\initial\empty_project.zip -d .\work
  15. echo ** tests: step 1 **
  16. echo run the test_export macro
  17. .\work\project0.accdb /X test_export
  18. echo control existence of zipped app
  19. python assert_exists.py .\work\project0.zip
  20. echo clean sources
  21. del .\work\source\modules\test_methods.bas
  22. del .\work\source\macros\test_export.bas
  23. del .\work\source\macros\test_import.bas
  24. echo copy source to results
  25. xcopy .\works\source .\results\source1
  26. echo control the result
  27. python compare.py .\results\source1 .\reference\source
  28. echo ** tests: step 2 **
  29. echo run import in empty_project.accdb
  30. .\work\empty_project.accdb /X test_import
  31. echo copy to results
  32. copy .\work\empty_project.accdb .\results\result1.accdb
  33. echo control existence of backup
  34. python assert_exists.py .\work\empty_project.accdb.old
  35. echo run import in project0.accdb
  36. .\work\project0.accdb /X test_import
  37. echo copy to results
  38. copy .\work\project0.accdb .\results\result2.accdb
  39. echo control existence of backup
  40. python assert_exists.py .\work\project0.accdb.old
  41. echo ** end **