clean up tests and folders
Build Debian Packages / build (bookworm, debian12) (push) Successful in 7m27s
Build Debian Packages / build (bullseye, debian11) (push) Successful in 7m2s
Build Debian Packages / build (trixie, debian13) (push) Successful in 8m49s

This commit is contained in:
2026-03-20 16:47:53 +01:00
parent c8192ecbb0
commit 5e37c1baa3
12 changed files with 35 additions and 29 deletions
+16 -14
View File
@@ -56,11 +56,14 @@ class ResultReader:
yield self.get_result_object(expected_filename)
# purge result file
if self.clear_results:
if os.path.isfile(expected_filename): os.remove(expected_filename)
if os.path.isfile(expected_filename):
os.remove(expected_filename)
if self.clear_jobs:
if os.path.isfile(expected_filename[:-7]): os.remove(expected_filename[:-7])
# job_name.result -> job_name
if os.path.isfile(expected_filename[:-7]):
os.remove(expected_filename[:-7])
self.no+=1
expected_filename=os.path.join(self.spool_dir,self.result_pattern%(self.no))
expected_filename=os.path.join(self.spool_dir, self.result_pattern % self.no)
return
def get_result_object(self, in_filename):
@@ -80,8 +83,10 @@ class ResultReader:
time.sleep(0.05)
retries+=1
# get date of last modification
self.result_job_date = datetime.fromtimestamp(os.stat(in_filename)[8])
# get date of last modification
stat_result = os.stat(in_filename)
mtime = stat_result.st_mtime
self.result_job_date = datetime.fromtimestamp(mtime)
if ELEMENT_TREE:
self.__parseFile = self.__parseFile_cETree
else:
@@ -155,7 +160,7 @@ class ResultReader:
self.result.set_nChannels(int(elem.get("channels")))
self.result.set_description_dictionary(self.result_description.copy())
title = "ADC-Result: job-id=%d"%int(self.result_job_number)
title = "ADC_Result: job-id=%d"%int(self.result_job_number)
if len(self.result_description) > 0:
for k,v in self.result_description.items():
title += ", %s=%s"%(k,v)
@@ -166,22 +171,19 @@ class ResultReader:
else:
if float(elem.get("rate")) != self.result.get_sampling_rate():
print("sample rate different in ADC_Result, found %f, former value %f"%\
(float(in_attribute["rate"]),self.result.get_sampling_rate()))
(float(elem.get("rate")),self.result.get_sampling_rate()))
new_samples = int(elem.get("samples"))
self.adc_result_sample_counter += new_samples
# extract adcdata (here base64 encoded)
self.adc_result_trailing_chars = "".join(elem.text.splitlines())
tmp_string = base64.standard_b64decode(self.adc_result_trailing_chars)
self.adc_result_trailing_chars = None
tmp = numpy.fromstring(tmp_string,dtype='int16')
tmp_string = None
tmp = numpy.fromstring(tmp_string, dtype='int16')
self.adc_result_parts.append(tmp)
tmp = None
# we do not need this adcdata anymore, delete it
elem.clear()
elif elem.tag == 'error':
self.__filetype = ResultReader.ERROR_TYPE