meson.build (1547B)
1 # Reverse-proxy integration tests. 2 # 3 # Builds the C upstream (libmicrohttpd), the raw-socket pipelining 4 # client, and — when the toolchains are available — Go and Rust 5 # upstreams, then runs the shell-driven test driver. 6 7 upstream_mhd = executable( 8 'upstream_mhd', 9 'upstream_mhd.c', 10 dependencies: [mhd_dep], 11 include_directories: [incdir, configuration_inc], 12 install: false, 13 ) 14 15 pipeline_client = executable( 16 'pipeline_client', 17 'pipeline_client.c', 18 include_directories: [incdir, configuration_inc], 19 install: false, 20 ) 21 22 test_deps = [upstream_mhd, pipeline_client, paivana_httpd_exe] 23 24 go_bin = find_program('go', required: false) 25 if go_bin.found() 26 upstream_go = custom_target( 27 'upstream_go', 28 input: 'upstream_go.go', 29 output: 'upstream_go', 30 command: [go_bin, 'build', '-o', '@OUTPUT@', '@INPUT@'], 31 build_by_default: true, 32 ) 33 test_deps += upstream_go 34 endif 35 36 rustc_bin = find_program('rustc', required: false) 37 if rustc_bin.found() 38 upstream_rs = custom_target( 39 'upstream_rs', 40 input: 'upstream_rs.rs', 41 output: 'upstream_rs', 42 command: [rustc_bin, '-O', '-o', '@OUTPUT@', '@INPUT@'], 43 build_by_default: true, 44 ) 45 test_deps += upstream_rs 46 endif 47 48 test( 49 'reverse_proxy', 50 files('test_reverse_proxy.sh'), 51 env: { 52 'SRCDIR': meson.current_source_dir(), 53 'BUILDDIR': meson.current_build_dir(), 54 'PAIVANA_HTTPD': paivana_httpd_exe.full_path(), 55 }, 56 depends: test_deps, 57 timeout: 120, 58 )