12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/bash
  2. . "$TF_DIR/include/subtest.sh"
  3. . "$TF_DIR/include/tools.sh"
  4. . "$(shellfu-get path)" || tf_exit_error "failed to init shellfu"
  5. SHELLFU_PATH=$(satcmd --saturnin-get-shellfu-path)
  6. shellfu import saturnin || tf_exit_error "failed to import saturnin"
  7. tf_enum_subtests() {
  8. echo "merge_first"
  9. echo "merge_first_no1"
  10. echo "merge_first_no2"
  11. echo "merge_first_no3"
  12. echo "merge_first_none"
  13. echo "merge_first_only1"
  14. echo "merge_first_only2"
  15. echo "merge_first_only3"
  16. echo "merge_first_raw"
  17. echo "merge_join"
  18. echo "merge_join_no1"
  19. echo "merge_join_no2"
  20. echo "merge_join_no3"
  21. echo "merge_join_only1"
  22. echo "merge_join_only2"
  23. echo "merge_join_only3"
  24. echo "merge_join_none"
  25. echo "merge_join_raw"
  26. }
  27. tf_do_subtest() {
  28. local name=$1
  29. local o_out="oracle/$name.stdout"
  30. local o_es=0
  31. local cmd
  32. local t_paths
  33. local t_args
  34. case $name in
  35. merge_first)
  36. t_paths='test/merge-a:test/merge-b'; t_args='s1.k1 t.conf' ;;
  37. merge_first_no1)
  38. t_paths='test/merge-x:test/merge-a:test/merge-b'; t_args='s1.k1 t.conf' ;;
  39. merge_first_no2)
  40. t_paths='test/merge-a:test/merge-x:test/merge-b'; t_args='s1.k1 t.conf' ;;
  41. merge_first_no3)
  42. t_paths='test/merge-a:test/merge-b:test/merge-x'; t_args='s1.k1 t.conf' ;;
  43. merge_first_none)
  44. t_paths='test/merge-x:test/merge-y:test/merge-z'; t_args='s1.k1 t.conf'; o_es=1 ;;
  45. merge_first_only1)
  46. t_paths='test/merge-b:test/merge-x:test/merge-y'; t_args='s1.k1 t.conf' ;;
  47. merge_first_only2)
  48. t_paths='test/merge-x:test/merge-b:test/merge-y'; t_args='s1.k1 t.conf' ;;
  49. merge_first_only3)
  50. t_paths='test/merge-x:test/merge-y:test/merge-b'; t_args='s1.k1 t.conf' ;;
  51. merge_first_raw)
  52. t_paths='test/merge-a:test/merge-b'; t_args='-r s2.k2 t.conf' ;;
  53. merge_join)
  54. t_paths='test/merge-a:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
  55. merge_join_no1)
  56. t_paths='test/merge-x:test/merge-a:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
  57. merge_join_no2)
  58. t_paths='test/merge-a:test/merge:x:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
  59. merge_join_no3)
  60. t_paths='test/merge-a:test/merge-b:test/merge:x'; t_args='-j s1.k1 t.conf' ;;
  61. merge_join_none)
  62. t_paths='test/merge-x:test/merge-y:test/merge-z'; t_args='-j s1.k1 t.conf'; o_es=1 ;;
  63. merge_join_only1)
  64. t_paths='test/merge-b:test/merge-x:test/merge-y'; t_args='-j s1.k1 t.conf' ;;
  65. merge_join_only2)
  66. t_paths='test/merge-x:test/merge-b:test/merge-y'; t_args='-j s1.k1 t.conf' ;;
  67. merge_join_only3)
  68. t_paths='test/merge-x:test/merge-y:test/merge-b'; t_args='-j s1.k1 t.conf' ;;
  69. merge_join_raw)
  70. t_paths='test/merge-a:test/merge-b'; t_args='-j -r s2.k2 t.conf' ;;
  71. esac
  72. tf_testflt -n "$name" -O "$o_out" -S "$o_es" "SATURNIN_CONF_PATH=$t_paths saturnin__conf $t_args"
  73. }
  74. tf_do_subtests