From 072ed57afedff66e7bbd3d3dc1bfc97ab287ef24 Mon Sep 17 00:00:00 2001
From: Aaron Viets <aaron.viets@ligo.org>
Date: Mon, 29 Jul 2024 12:14:28 -0700
Subject: [PATCH] maybe CI will pass this time

---
 .gitlab-ci.yml                           |  3 --
 bin/gstlal_compute_strain                |  5 +--
 gst/lal/gstlal_pacer.c                   |  1 -
 tests/tests_pytest/run_calib_pipeline.py | 46 ++++++++++--------------
 4 files changed, 19 insertions(+), 36 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e24a81415..10b9578eb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -130,10 +130,7 @@ test:
     - dnf -y -q install git-all
   script:
     # install our packages
-    - pwd
-    - ls
     - dnf -y -q install gstlal-calibration-*.rpm
-    - env
     # check the GST plugins
     - gst-inspect-1.0
     - gst-inspect-1.0 gstlalcalibration
diff --git a/bin/gstlal_compute_strain b/bin/gstlal_compute_strain
index 607a0075e..41abc9223 100755
--- a/bin/gstlal_compute_strain
+++ b/bin/gstlal_compute_strain
@@ -1069,8 +1069,7 @@ mainloop = GLib.MainLoop.new(None, True)
 if kafka_server is not None:
 	handler = calibhandler.Handler(mainloop, pipeline, kafka_server = kafka_server, verbose = verbose, latency_suffix = latency_suffix)
 else:
-	#print("Using simple handler", file=sys.stderr)
-	print("ci_latency_dir=%s" % ci_latency_dir, file = sys.stderr)
+	print("Using simple handler", file=sys.stderr)
 	handler = simplehandler.Handler(mainloop, pipeline)
 
 # 
@@ -1094,10 +1093,8 @@ if InputConfigs["datasource"] == "lvshm": # Data is to be read from shared memor
 	src = pipeparts.mklvshmsrc(pipeline, shm_name = InputConfigs["shmpartition"], assumed_duration = input_frame_duration)
 elif InputConfigs["datasource"] == "frames": # Data is to be read from frame files; "offline" mode
 	src = pipeparts.mklalcachesrc(pipeline, location = options.frame_cache, cache_dsc_regex = instrument, use_mmap = True)
-	print("ci_latency_dir=%s" % ci_latency_dir, file = sys.stderr)
 	if ci_latency_dir is not None:
 		src = pipeparts.mkgeneric(pipeline, calibration_parts.mkqueue(pipeline, src), "lal_pacer")
-		print("src=%s" % src, file = sys.stderr)
 
 if(test_latency or InputConfigs["datasource"] == "lvshm" and kafka_server is not None):
 	src = pipeparts.mktee(pipeline, src)
diff --git a/gst/lal/gstlal_pacer.c b/gst/lal/gstlal_pacer.c
index 299ef4cf4..7712762b3 100644
--- a/gst/lal/gstlal_pacer.c
+++ b/gst/lal/gstlal_pacer.c
@@ -167,7 +167,6 @@ static GstFlowReturn transform_ip(GstBaseTransform *trans, GstBuffer *buf) {
 
 	time_to_push_buffer = element->real_t0 + (stream_time - element->t0) / element->speed;
 	wait_time = time_to_push_buffer > current_time ? time_to_push_buffer - current_time : 0;
-	GST_WARNING_OBJECT(element, "real_t0=%lu\nt0=%lu\ncurrent_time=%lu\nstream_time=%lu\ntime_to_push_buffer=%lu\nwait_time=%lu", element->real_t0, element->t0, current_time, stream_time, time_to_push_buffer, wait_time);
 
 	sleep(wait_time / 1000000000.0);
 
diff --git a/tests/tests_pytest/run_calib_pipeline.py b/tests/tests_pytest/run_calib_pipeline.py
index 52658533a..c2b671c63 100644
--- a/tests/tests_pytest/run_calib_pipeline.py
+++ b/tests/tests_pytest/run_calib_pipeline.py
@@ -23,44 +23,34 @@ def Run_calib():
     os.system("ls tests/tests_pytest/frames/raw/H-H1_R-*.gwf | lal_path2cache > tests/tests_pytest/raw_frames.cache")
     os.system("mkdir -p tests/tests_pytest/frames/GDS")
 
-    #e_file = open('tests/tests_pytest/error_results.txt', 'a')
-    #e_file.write('Running Approx-TDCFs calibration pipeline\n')
-    #e_file.close()
-    #os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404304216 --gps-end-time 1404308216 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_Approx_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
-    #e_file = open('tests/tests_pytest/error_results.txt', 'a')
-    #e_file.write('Finished running Approx-TDCFs calibration pipeline\n')
-    #e_file.close()
-    #os.system("ls tests/tests_pytest/frames/GDS/H-H1GDS_Approx-*.gwf | lal_path2cache > tests/tests_pytest/GDS_Approx_frames.cache")
-
-    #e_file = open('tests/tests_pytest/error_results.txt', 'a')
-    #e_file.write('Running Exact-TDCFs calibration pipeline\n')
-    #e_file.close()
-    #os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404304216 --gps-end-time 1404308216 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_Exact_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
-    #e_file = open('tests/tests_pytest/error_results.txt', 'a')
-    #e_file.write('Finished running Exact-TDCFs calibration pipeline\n')
-    #e_file.close()
-    #os.system("ls tests/tests_pytest/frames/GDS/H-H1GDS_Exact-*.gwf | lal_path2cache > tests/tests_pytest/GDS_Exact_frames.cache")
+    e_file = open('tests/tests_pytest/error_results.txt', 'a')
+    e_file.write('Running Approx-TDCFs calibration pipeline\n')
+    e_file.close()
+    os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404304216 --gps-end-time 1404308216 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_Approx_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
+    e_file = open('tests/tests_pytest/error_results.txt', 'a')
+    e_file.write('Finished running Approx-TDCFs calibration pipeline\n')
+    e_file.close()
+    os.system("ls tests/tests_pytest/frames/GDS/H-H1GDS_Approx-*.gwf | lal_path2cache > tests/tests_pytest/GDS_Approx_frames.cache")
 
-    #e_file = open('tests/tests_pytest/error_results.txt', 'a')
-    #e_file.write('Running Approx-TDCFs calibration pipeline with a later start time\n')
-    #e_file.close()
-    #os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404306245 --gps-end-time 1404308216 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_ApproxLaterStart_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
-    #e_file = open('tests/tests_pytest/error_results.txt', 'a')
-    #e_file.write('Finished running Approx-TDCFs calibration pipeline with a later start time\n')
-    #e_file.close()
-    #os.system("ls tests/tests_pytest/frames/GDS/H-H1GDS_LaterStart-*.gwf | lal_path2cache > tests/tests_pytest/GDS_LaterStart_frames.cache")
+    e_file = open('tests/tests_pytest/error_results.txt', 'a')
+    e_file.write('Running Exact-TDCFs calibration pipeline\n')
+    e_file.close()
+    os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404304216 --gps-end-time 1404308216 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_Exact_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
+    e_file = open('tests/tests_pytest/error_results.txt', 'a')
+    e_file.write('Finished running Exact-TDCFs calibration pipeline\n')
+    e_file.close()
+    os.system("ls tests/tests_pytest/frames/GDS/H-H1GDS_Exact-*.gwf | lal_path2cache > tests/tests_pytest/GDS_Exact_frames.cache")
 
-    os.system("GST_DEBUG=3 gst-launch-1.0 audiotestsrc num_buffers=5 samplesperbuffer=16 ! audio/x-raw,format=F64LE,rate=16 ! lal_pacer ! fakesink")
     e_file = open('tests/tests_pytest/error_results.txt', 'a')
     e_file.write('Running Approx-TDCFs calibration pipeline with a later start time\n')
     e_file.close()
-    os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404306245 --gps-end-time 1404306345 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_ApproxLaterStart_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
+    os.system("GST_DEBUG=3 gstlal_compute_strain --gps-start-time 1404306245 --gps-end-time 1404308216 --frame-cache tests/tests_pytest/raw_frames.cache --output-path tests/tests_pytest/frames/GDS --frame-duration=4 --frames-per-file=1 --wings=0 --config-file tests/tests_pytest/filters/gstlal_compute_strain_ApproxLaterStart_H1.ini --filters-file-name tests/tests_pytest/filters/gstlal_compute_strain_C00_filters_H1_20240330T211519Z.npz")
     e_file = open('tests/tests_pytest/error_results.txt', 'a')
     e_file.write('Finished running Approx-TDCFs calibration pipeline with a later start time\n')
     e_file.close()
     os.system("ls tests/tests_pytest/frames/GDS/H-H1GDS_LaterStart-*.gwf | lal_path2cache > tests/tests_pytest/GDS_LaterStart_frames.cache")
 
     f_num = len(os.listdir('tests/tests_pytest/frames/GDS'))
-    assert False #f_num == 2468
+    assert f_num == 2468
 
 
-- 
GitLab