TF_RUN 3.0KB

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