As pure Django (without South) does. This is not a perfect solution but an simple workaround.
Signed-off-by: Cleber Rosa <[email protected]> --- installation_support/autotest-database-turnkey | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/installation_support/autotest-database-turnkey b/installation_support/autotest-database-turnkey index 9a62156..a3a12bf 100755 --- a/installation_support/autotest-database-turnkey +++ b/installation_support/autotest-database-turnkey @@ -183,6 +183,17 @@ class App(object): django.core.management.execute_from_command_line(argv) argv = ['manage.py', 'migrate', '-v0', '--noinput'] django.core.management.execute_from_command_line(argv) + + # South does not run the initial SQL file. This could be added as an + # extension to Django's management commands, but for now, let's KISS + this_path = os.path.dirname(os.path.abspath(__file__)) + base_path = os.path.dirname(this_path) + tko_view_sql_path = os.path.join(base_path, 'frontend', 'tko', + 'sql', 'test.sql') + if os.path.exists(tko_view_sql_path): + sql = open(tko_view_sql_path).read() + if not (mngr.run_sql(sql)): + return -1 return 0 else: -- 1.7.11.7 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
