Skip to content

Commit

Permalink
Import at max 10 external resouces per test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
mikahanninen committed Dec 12, 2012
1 parent 16228a2 commit 8ab53d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rfgen.py
Expand Up @@ -202,8 +202,13 @@ def _create_test_suite(dirs, filecount = 1, testcount = 20, avg_test_depth = 5,
except IndexError: except IndexError:
break break
# USE ALL EXTERNAL RESOURCES # USE ALL EXTERNAL RESOURCES
# import max 10
imported_external_resources = 0
for res in available_external_resources: for res in available_external_resources:
settings_txt += "Resource\t%s\n" % res settings_txt += "Resource\t%s\n" % res
imported_external_resources += 1
if imported_external_resources == 10:
break
settings_txt += "\n" settings_txt += "\n"
keywords_txt += "*** Keywords ***\n" keywords_txt += "*** Keywords ***\n"
keywords_txt += "My Keyword\n\tNo Operation\n" keywords_txt += "My Keyword\n\tNo Operation\n"
Expand Down Expand Up @@ -266,9 +271,10 @@ def _create_test_resources(dirs, resource_files, resources_in_file, external_res
extfile_ondisk = open(final_external_filename, "w") extfile_ondisk = open(final_external_filename, "w")
extfile_ondisk.write(content) extfile_ondisk.write(content)
extfile_ondisk.close() extfile_ondisk.close()
db_cursor.execute("INSERT INTO keywords (name,source) VALUES ('%s','%s')" % (kw_name, final_external_filename))
db_cursor.execute("INSERT INTO source (path,type) VALUES ('%s','EXT_RESOURCE')" % final_external_filename) db_cursor.execute("INSERT INTO source (path,type) VALUES ('%s','EXT_RESOURCE')" % final_external_filename)


db_cursor.execute("INSERT INTO source (path,type) VALUES ('%s','RESOURCE')" % final_external_filename)






Expand Down

0 comments on commit 8ab53d8

Please sign in to comment.