@@ -70,31 +70,32 @@ def test_1(act: Action, tmp_run_py: Path, tmp_log_py: Path, tmp_sql_py: Path, ca
7070
7171os.environ["ISC_USER"] = '{ act .db .user } '
7272os.environ["ISC_PASSWORD"] = '{ act .db .password } '
73- driver_config.fb_client_library.value = "{ act .vars ['fbclient' ]} "
73+ driver_config.fb_client_library.value = r "{ act .vars ['fbclient' ]} "
7474
75- with connect_server('localhost:service_mgr') as srv:
76- bin_isql="{ act .vars ['isql' ]} "
77- bin_gfix="{ act .vars ['gfix' ]} "
78- bin_gstat="{ act .vars ['gstat' ]} "
79-
80- with connect('{ act .db .dsn } ') as con:
81- #print(f"Trying to run gfix -shut full -force 0 '{ act .db .dsn } '")
82- subprocess.run( [bin_gfix, '-shut', 'full', '-force', '0', '{ act .db .dsn } '] )
83- subprocess.run( [bin_gstat, '-h', '{ act .db .db_path } '] )
84- #print(f"Trying to run gfix -online '{ act .db .dsn } '")
85- subprocess.run( [bin_gfix, '-online', '{ act .db .dsn } '] )
86- subprocess.run( [bin_gstat, '-h', '{ act .db .db_path } '] )
75+ bin_isql = r"{ act .vars ['isql' ]} "
76+ bin_gfix = r"{ act .vars ['gfix' ]} "
77+ bin_gstat = r"{ act .vars ['gstat' ]} "
78+ db_conn = r'{ act .db .dsn } '
79+ db_file = r'{ act .db .db_path } '
80+ tmp_sql = r'{ str (tmp_sql_py )} '
81+
82+ with connect(db_conn) as con:
83+ #print(f"Trying to run gfix -shut full -force 0 db_conn")
84+ subprocess.run( [bin_gfix, '-shut', 'full', '-force', '0', db_conn] )
85+ subprocess.run( [bin_gstat, '-h', db_file] )
86+ #print(f"Trying to run gfix -online db_conn")
87+ subprocess.run( [bin_gfix, '-online', db_conn] )
88+ subprocess.run( [bin_gstat, '-h', db_file] )
8789
8890chk_sql='''
8991 set list on;
9092 set count on;
9193 select att_cnt from logger;
9294'''
93- with open(' { str ( tmp_sql_py ) } ' , 'w') as f:
95+ with open(tmp_sql , 'w') as f:
9496 f.write(chk_sql)
9597
96- #subprocess.run( [bin_isql, '-q', '-i', '{ str (tmp_sql_py )} ', '-user', os.environ["ISC_USER"], '-pas', os.environ["ISC_PASSWORD"], '{ act .db .dsn } '] )
97- subprocess.run( [bin_isql, '-q', '-i', '{ str (tmp_sql_py )} ', '{ act .db .dsn } '] )
98+ subprocess.run( [bin_isql, '-q', '-i', tmp_sql, db_conn] )
9899"""
99100
100101 tmp_run_py .write_text (py_source )
0 commit comments