From: graham.gower@gmail.com Date: Thu, 23 Dec 2010 01:38:57 +0000 (+0000) Subject: Create the regress offline_root from scratch. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7486bf366c05312e7d50d5f969a539a6a581fcac;p=oweals%2Fopkg-lede.git Create the regress offline_root from scratch. git-svn-id: http://opkg.googlecode.com/svn/trunk@596 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- diff --git a/tests/regress/opk.py b/tests/regress/opk.py index 616658a..9763bd3 100644 --- a/tests/regress/opk.py +++ b/tests/regress/opk.py @@ -90,6 +90,12 @@ def regress_init(): os.chdir(cfg.opkdir) - odir = "{}/usr/lib/opkg".format(cfg.offline_root) - os.system("rm -fr {}".format(odir)) - os.mkdir(odir) + os.system("rm -fr {}".format(cfg.offline_root)) + + os.makedirs("{}/usr/lib/opkg".format(cfg.offline_root)) + os.makedirs("{}/etc/opkg".format(cfg.offline_root)) + + f = open("{}/etc/opkg/opkg.conf".format(cfg.offline_root), "w") + f.write("arch all 1\n") + f.write("src test file:{}\n".format(cfg.opkdir)) + f.close()