hw-errors/l500/test-sanity.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2021 Intel Corporation. All Rights Reserved.
3 
4 
5 #include "../../func-common.h"
6 #include "l500-error-common.h"
7 #include "../error-common.h"
8 
9 //#test:device L500*
10 
11 using namespace rs2;
12 
13 // Return the same device (the first device found) to avoid unnecessary reinitializations
15 {
17  return dev;
18 }
19 
20 TEST_CASE( "Create device", "[l500][live]" )
21 {
22  get_device();
23 }
24 
25 TEST_CASE( "Non-streaming", "[l500][live]" )
26 {
28 }
29 
30 TEST_CASE( "Streaming", "[l500][live]")
31 {
32  // Require at least one device to be plugged in
33  auto dev = get_device();
34  auto depth_sens = dev.first< rs2::depth_sensor >();
35 
36  auto depth = find_default_depth_profile( depth_sens );
37  auto ir = find_default_ir_profile( depth_sens );
38  auto confidence = find_confidence_corresponding_to_depth( depth_sens, depth );
39 
40  do_while_streaming( depth_sens, { depth, ir, confidence }, [&]() {
42  } );
43 }
TEST_CASE("Create device","[l500][live]")
stream_profile find_default_depth_profile(rs2::depth_sensor depth_sens)
Definition: func-common.h:120
GLint GLint GLsizei GLsizei GLsizei depth
std::map< uint8_t, std::pair< std::string, rs2_log_severity > > build_log_errors_map()
Definition: cah-model.h:10
void do_while_streaming(rs2::sensor depth_sens, std::vector< stream_profile > profiles, std::function< void() > action)
Definition: func-common.h:214
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition: func-common.h:24
stream_profile find_default_ir_profile(rs2::depth_sensor depth_sens)
Definition: func-common.h:134
#define RS2_PRODUCT_LINE_L500
Definition: rs_context.h:96
void validate_errors_handling(const rs2::device &dev, const std::map< uint8_t, std::pair< std::string, rs2_log_severity > > &error_report)
Definition: error-common.h:10
stream_profile find_confidence_corresponding_to_depth(rs2::depth_sensor depth_sens, stream_profile depth_profile)
Definition: func-common.h:148
static rs2::device get_device()


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:11