• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include(GoogleTest)
2
3SET(DE_UT_SRCS
4        affine_op_test.cc
5        execute_test.cc
6        album_op_test.cc
7        arena_test.cc
8        auto_contrast_op_test.cc
9        batch_op_test.cc
10        bit_functions_test.cc
11        bounding_box_augment_op_test.cc
12        btree_test.cc
13        buddy_test.cc
14        build_vocab_test.cc
15        c_api_audio_a_to_q_test.cc
16        c_api_audio_r_to_z_test.cc
17        c_api_cache_test.cc
18        c_api_dataset_album_test.cc
19        c_api_dataset_cifar_test.cc
20        c_api_dataset_cityscapes_test.cc
21        c_api_dataset_clue_test.cc
22        c_api_dataset_coco_test.cc
23        c_api_dataset_config_test.cc
24        c_api_dataset_csv_test.cc
25        c_api_dataset_div2k_test.cc
26        c_api_dataset_flickr_test.cc
27        c_api_dataset_iterator_test.cc
28        c_api_dataset_manifest_test.cc
29        c_api_dataset_minddata_test.cc
30        c_api_dataset_ops_test.cc
31        c_api_dataset_randomdata_test.cc
32        c_api_dataset_save.cc
33        c_api_dataset_sbu_test.cc
34        c_api_dataset_textfile_test.cc
35        c_api_dataset_tfrecord_test.cc
36        c_api_dataset_usps_test.cc
37        c_api_dataset_voc_test.cc
38        c_api_datasets_test.cc
39        c_api_epoch_ctrl_test.cc
40        c_api_pull_based_test.cc
41        c_api_repeat_test.cc
42        c_api_samplers_test.cc
43        c_api_text_sentence_piece_vocab_test.cc
44        c_api_text_vocab_test.cc
45        c_api_transforms_test.cc
46        c_api_vision_a_to_q_test.cc
47        c_api_vision_affine_test.cc
48        c_api_vision_bounding_box_augment_test.cc
49        c_api_vision_horizontal_flip_test.cc
50        c_api_vision_random_subselect_policy_test.cc
51        c_api_vision_random_test.cc
52        c_api_vision_r_to_z_test.cc
53        c_api_vision_slice_patches_test.cc
54        c_api_vision_soft_dvpp_test.cc
55        c_api_vision_uniform_aug_test.cc
56        c_api_vision_vertical_flip_test.cc
57        celeba_op_test.cc
58        center_crop_op_test.cc
59        channel_swap_test.cc
60        cifar_op_test.cc
61        circular_pool_test.cc
62        client_config_test.cc
63        clue_op_test.cc
64        coco_op_test.cc
65        common/bboxop_common.cc
66        common/common.cc
67        common/cvop_common.cc
68        concat_op_test.cc
69        concatenate_op_test.cc
70        connector_test.cc
71        csv_op_test.cc
72        cut_out_op_test.cc
73        cutmix_batch_op_test.cc
74        cyclic_array_test.cc
75        data_helper_test.cc
76        datatype_test.cc
77        decode_op_test.cc
78        distributed_sampler_test.cc
79        equalize_op_test.cc
80        execution_tree_test.cc
81        fill_op_test.cc
82        c_api_vision_gaussian_blur_test.cc
83        global_context_test.cc
84        gnn_graph_test.cc
85        image_folder_op_test.cc
86        image_process_test.cc
87        interrupt_test.cc
88        ir_callback_test.cc
89        ir_sampler_test.cc
90        ir_tensor_op_fusion_pass_test.cc
91        ir_tree_adapter_test.cc
92        ir_vision_random_test.cc
93        ir_vision_test.cc
94        jieba_tokenizer_op_test.cc
95        main_test.cc
96        map_op_test.cc
97        mask_test.cc
98        memory_pool_test.cc
99        mind_record_op_test.cc
100        mixup_batch_op_test.cc
101        mnist_op_test.cc
102        normalize_op_test.cc
103        one_hot_op_test.cc
104        optimization_pass_test.cc
105        pad_end_op_test.cc
106        pad_op_test.cc
107        path_test.cc
108        perf_data_test.cc
109        project_op_test.cc
110        queue_test.cc
111        random_affine_op_test.cc
112        random_color_adjust_op_test.cc
113        random_color_op_test.cc
114        random_crop_and_resize_op_test.cc
115        random_crop_and_resize_with_bbox_op_test.cc
116        random_crop_decode_resize_op_test.cc
117        random_crop_op_test.cc
118        random_crop_with_bbox_op_test.cc
119        random_horizontal_flip_op_test.cc
120        random_horizontal_flip_with_bbox_test.cc
121        random_resize_op_test.cc
122        random_resize_op_test.cc
123        random_resize_with_bbox_op_test.cc
124        random_rotation_op_test.cc
125        random_solarize_op_test.cc
126        random_vertical_flip_op_test.cc
127        random_vertical_flip_with_bbox_op_test.cc
128        rename_op_test.cc
129        rescale_op_test.cc
130        resize_op_test.cc
131        resize_with_bbox_op_test.cc
132        rgba_to_bgr_op_test.cc
133        rgba_to_rgb_op_test.cc
134        schema_test.cc
135        sentence_piece_vocab_op_test.cc
136        shuffle_op_test.cc
137        skip_op_test.cc
138        slice_op_test.cc
139        sliding_window_op_test.cc
140        solarize_op_test.cc
141        stand_alone_samplers_test.cc
142        status_test.cc
143        storage_container_test.cc
144        subset_random_sampler_test.cc
145        subset_sampler_test.cc
146        swap_red_blue_test.cc
147        take_op_test.cc
148        task_manager_test.cc
149        tensor_row_test.cc
150        tensor_string_test.cc
151        tensor_test.cc
152        tensorshape_test.cc
153        text_file_op_test.cc
154        tfReader_op_test.cc
155        to_float16_op_test.cc
156        tokenizer_op_test.cc
157        treap_test.cc
158        tree_modifying_function_test.cc
159        trucate_pair_test.cc
160        type_cast_op_test.cc
161        weighted_random_sampler_test.cc
162        zip_op_test.cc
163        )
164
165if(ENABLE_PYTHON)
166    set(DE_UT_SRCS
167            ${DE_UT_SRCS}
168            filter_op_test.cc
169            manifest_op_test.cc
170            voc_op_test.cc
171            sentence_piece_vocab_op_test.cc
172            )
173endif()
174
175if(ENABLE_ACL)
176    set(DE_UT_SRCS
177            ${DE_UT_SRCS}
178            dvpp_decode_jpeg_test.cc)
179endif()
180
181add_executable(de_ut_tests ${DE_UT_SRCS})
182
183set_target_properties(de_ut_tests PROPERTIES INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../lib64")
184
185target_link_libraries(de_ut_tests PRIVATE
186        _c_dataengine pybind11::embed
187        ${GTEST_LIBRARY}
188        ${SECUREC_LIBRARY}
189        ${SLOG_LIBRARY}
190        )
191
192gtest_discover_tests(de_ut_tests WORKING_DIRECTORY ${Project_DIR}/tests/dataset)
193
194install(TARGETS de_ut_tests
195        RUNTIME DESTINATION test)
196
197# For internal testing only.
198install(DIRECTORY ${Project_DIR}/tests/dataset/data/
199        DESTINATION test/data)
200