Lines Matching refs:os
13 import os
21 if os.environ.get("BB_SKIP_NETTESTS") == "yes":
378 self.origdir = os.getcwd()
381 self.dldir = os.path.join(self.tempdir, "download")
382 os.mkdir(self.dldir)
384 self.unpackdir = os.path.join(self.tempdir, "unpacked")
385 os.mkdir(self.unpackdir)
386 persistdir = os.path.join(self.tempdir, "persistdata")
390 os.chdir(self.origdir)
391 if os.environ.get("BB_TMPDIR_NOCLEAN") == "yes":
535 dir = os.listdir(self.dldir + "/git2")
545 dir = os.listdir(self.dldir + "/git2")
558 dir = os.listdir(self.dldir + "/git2")
583 dir = os.listdir(self.dldir)
593 dir = os.listdir(self.dldir)
618 dir = os.listdir(self.dldir)
628 dir = os.listdir(self.dldir)
649 cwd=os.path.join(self.unpackdir, 'git'))
653 archive = tarfile.open(os.path.join(self.dldir, self.recipe_tarball))
667 os.utime(fn, None)
670 self.localsrcdir = os.path.join(self.tempdir, 'localsrc')
671 os.makedirs(self.localsrcdir)
672 touch(os.path.join(self.localsrcdir, 'a'))
673 touch(os.path.join(self.localsrcdir, 'b'))
674 os.makedirs(os.path.join(self.localsrcdir, 'dir'))
675 touch(os.path.join(self.localsrcdir, 'dir', 'c'))
676 touch(os.path.join(self.localsrcdir, 'dir', 'd'))
677 os.makedirs(os.path.join(self.localsrcdir, 'dir', 'subdir'))
678 touch(os.path.join(self.localsrcdir, 'dir', 'subdir', 'e'))
679 touch(os.path.join(self.localsrcdir, r'backslash\x2dsystemd-unit.device'))
690 for root, dirs, files in os.walk(self.unpackdir):
692 flst.append(os.path.relpath(os.path.join(root, f), self.unpackdir))
731 tree = self.fetchUnpack(['file://a;subdir=%s' % os.path.join(self.unpackdir, 'bar')])
753 self.gitdir = os.path.abspath(src_dir)
769 cwd=os.path.join(self.unpackdir, 'git')).strip()
780 alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates')
781 self.assertTrue(os.path.exists(alt))
787 alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates')
788 self.assertFalse(os.path.exists(alt))
801 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
802 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
810 with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb") as f:
816 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
817 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
820 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
825 with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb"):
831 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
832 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
837 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
840 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
841 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
850 with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb"):
853 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
854 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
863 with open(os.path.join(self.dldir, "test-file.tar.gz"), "wb"):
865 with open(os.path.join(self.dldir, "test-file.tar.gz.done"), "wb"):
868 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
869 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
875 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
876 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
880 with open(os.path.join(self.dldir, "test-file.tar.gz.done"), "wb"):
883 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
884 self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
890 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz")))
891 self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done")))
898 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
899 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.1.tar.gz"), 57892)
904 self.assertEqual(len(os.listdir(self.unpackdir + "/bitbake-1.0/")), 9)
905 self.assertEqual(len(os.listdir(self.unpackdir + "/bitbake-1.1/")), 9)
912 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
919 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
925 os.mkdir(self.dldir + "/some2where")
927 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
934 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
940 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-v1.0.0.tar.gz"), 57749)
947 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
955 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
963 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
970 cwd=os.path.join(self.unpackdir, 'git')).strip()
1045 os.chdir(self.tempdir)
1059 os.chdir(os.path.dirname(self.unpackdir))
1062 repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
1063 self.assertTrue(os.path.exists(repo_path), msg='Unpacked repository missing')
1064 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'bitbake')), msg='bitbake submodule missing…
1065 …self.assertFalse(os.path.exists(os.path.join(repo_path, 'na')), msg='uninitialized submodule prese…
1068 if os.path.exists(os.path.join(repo_path, 'bitbake-gitsm-test1')):
1069 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'bitbake-gitsm-test1', 'bitbake')), msg='su…
1079 os.chdir(os.path.dirname(self.unpackdir))
1082 repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
1083 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-dvar/config')),…
1084 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-list/config')),…
1085 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-rbtree/config')…
1086 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-sundry/config')…
1087 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-utf8/config')),…
1095 os.chdir(os.path.dirname(self.unpackdir))
1098 repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
1099 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/googletest/config')), …
1100 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/json/config')), msg='M…
1101 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/sanitizers/config')), …
1115 os.chdir(os.path.dirname(self.unpackdir))
1118 repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
1119 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/googletest/config')), …
1120 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/json/config')), msg='M…
1121 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/sanitizers/config')), …
1129 os.chdir(os.path.dirname(self.unpackdir))
1132 repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
1133 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/partial/extern/isotp-c/config…
1134 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/partial/extern/isotp-c/module…
1135 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'partial/extern/isotp-c/deps/bitfield-c/.gi…
1136 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/tests/tuf-test-vectors/config…
1137 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/third_party/googletest/config…
1138 …self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/third_party/HdrHistogram_c/co…
1149 os.chdir(os.path.dirname(self.unpackdir))
1152 repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
1154 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-sha…
1155 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-sha…
1156 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-sha…
1157 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-sha…
1158 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-sha…
1159 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-sha…
1160 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1161 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1162 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1163 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1164 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1165 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1166 …self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/…
1188 src_dir = os.path.abspath(src_dir)
1194 repo_dir = os.path.abspath(repo_dir)
1204 cwd=os.path.join(self.tempdir, 'svnfetch_co', 'trunk'))
1206 cwd=os.path.join(self.tempdir, 'svnfetch_co', 'trunk'))
1213 os.chdir(self.origdir)
1214 if os.environ.get("BB_TMPDIR_NOCLEAN") == "yes":
1226 os.chdir(os.path.dirname(self.unpackdir))
1229 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'trunk')), msg="Missing trunk")
1230 …self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'trunk', 'README.md')), msg="Missing c…
1231 …self.assertFalse(os.path.exists(os.path.join(self.unpackdir, 'trunk/bitbake/trunk')), msg="Externa…
1232 …self.assertFalse(os.path.exists(os.path.join(self.unpackdir, 'trunk/bitbake/trunk', 'README')), ms…
1240 os.chdir(os.path.dirname(self.unpackdir))
1243 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'trunk')), msg="Missing trunk")
1244 …self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'trunk', 'README.md')), msg="Missing c…
1245 …self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'trunk/bitbake/trunk')), msg="External…
1246 …self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'trunk/bitbake/trunk', 'README')), msg…
1418 testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata"
1485 self.gitdir = os.path.join(self.tempdir, 'gitshallow')
1509 open(os.path.join(self.gitdir, path), 'w').close()
1599 self.gitdir = os.path.join(self.tempdir, 'git')
1600 self.srcdir = os.path.join(self.tempdir, 'gitsource')
1640 open(os.path.join(cwd, path), 'w').close()
1663 assert os.path.exists(self.d.getVar('S'))
1669 …assert os.path.exists(ud.clonedir), 'Git clone in DLDIR (%s) does not exist for uri %s' % (ud.clon…
1673 assert os.path.exists(os.path.join(self.dldir, ud.mirrortarballs[0]))
1685 …assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')), 'Unpacked git repository at %…
1687 …assert not os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')), 'Unpacked git repository …
1782 assert os.path.exists(os.path.join(self.gitdir, 'a'))
1783 assert os.path.exists(os.path.join(self.gitdir, 'b'))
1807 assert os.path.exists(os.path.join(self.gitdir, 'a'))
1808 assert os.path.exists(os.path.join(self.gitdir, 'b'))
1809 assert not os.path.exists(os.path.join(self.gitdir, 'c'))
1827 smdir = os.path.join(self.tempdir, 'gitsubmodule')
1848 assert os.listdir(os.path.join(self.gitdir, 'gitsubmodule'))
1851 self.assertRevCount(1, cwd=os.path.join(self.gitdir, 'gitsubmodule'))
1857 smdir = os.path.join(self.tempdir, 'gitsubmodule')
1877 mirrordir = os.path.join(self.tempdir, 'mirror')
1890 assert os.listdir(os.path.join(self.gitdir, 'gitsubmodule'))
1893 self.assertRevCount(1, cwd=os.path.join(self.gitdir, 'gitsubmodule'))
1895 if any(os.path.exists(os.path.join(p, 'git-annex')) for p in os.environ.get('PATH').split(':')):
1900 open(os.path.join(self.srcdir, 'c'), 'w').close()
1909 …assert './.git/annex/' in bb.process.run('tar -tzf %s' % os.path.join(self.dldir, ud.mirrortarball…
1910 assert os.path.exists(os.path.join(self.gitdir, 'c'))
1972 assert os.path.exists(os.path.join(self.dldir, ud.mirrortarballs[0]))
1980 assert not os.path.exists(os.path.join(self.gitdir, '.git', 'shallow'))
1989 assert os.path.exists(os.path.join(self.dldir, mirrortarball))
1992 mirrordir = os.path.join(self.tempdir, 'mirror')
1996 bb.utils.rename(os.path.join(self.dldir, mirrortarball),
1997 os.path.join(mirrordir, mirrortarball))
2158 dir = os.listdir(self.unpackdir + "/git/")
2165 self.gitdir = os.path.join(self.tempdir, 'git')
2166 self.srcdir = os.path.join(self.tempdir, 'gitsource')
2179 with open(os.path.join(self.srcdir, '.gitattributes'), 'wt') as attrs:
2271 self.assertEqual(ud.localfile, os.path.join(self.dldir, "git2", ref['gitsrcname']))
2272 self.assertEqual(ud.localpath, os.path.join(self.dldir, "git2", ref['gitsrcname']))
2273 … self.assertEqual(ud.lockfile, os.path.join(self.dldir, "git2", ref['gitsrcname'] + '.lock'))
2274 self.assertEqual(ud.clonedir, os.path.join(self.dldir, "git2", ref['gitsrcname']))
2275 … self.assertEqual(ud.fullmirror, os.path.join(self.dldir, "git2_" + ref['gitsrcname'] + '.tar.gz'))
2290 self.assertEqual(sorted(os.listdir(self.tempdir)), ['cargo_home', 'download' , 'unpacked'])
2291 …self.assertEqual(sorted(os.listdir(self.tempdir + "/download")), ['glob-0.2.11.crate', 'glob-0.2.1…
2292 …self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/glob-0.2.11/.cargo-checksum.jso…
2293 self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/glob-0.2.11/src/lib.rs"))
2307 self.assertEqual(sorted(os.listdir(self.tempdir)), ['cargo_home', 'download' , 'unpacked'])
2308 …self.assertEqual(sorted(os.listdir(self.tempdir + "/download")), ['glob-0.2.11.crate', 'glob-0.2.1…
2309 …self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/glob-0.2.11/.cargo-checksum.jso…
2310 self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/glob-0.2.11/src/lib.rs"))
2311 …self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/time-0.1.35/.cargo-checksum.jso…
2312 self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/time-0.1.35/src/lib.rs"))
2328 self.assertTrue(os.path.exists(ud.localpath))
2329 self.assertTrue(os.path.exists(ud.localpath + '.done'))
2330 self.assertTrue(os.path.exists(ud.resolvefile))
2332 unpackdir = os.path.join(self.unpackdir, 'npm')
2333 self.assertTrue(os.path.exists(os.path.join(unpackdir, 'package.json')))
2343 self.assertTrue(os.path.exists(ud.localpath))
2351 self.assertTrue(os.path.exists(ud.localpath + '_bad-checksum_' + badsum))
2352 self.assertTrue(os.path.exists(ud.localpath))
2362 self.assertTrue(os.path.exists(ud.localpath))
2365 mirrordir = os.path.join(self.tempdir, 'mirror')
2367 os.mkdir(self.dldir)
2374 self.assertFalse(os.path.exists(ud.localpath))
2382 self.assertTrue(os.path.exists(ud.localpath))
2392 self.assertTrue(os.path.exists(ud.localpath))
2394 mirrordir = os.path.join(self.tempdir, 'mirror')
2396 mirrorfilename = os.path.join(mirrordir, os.path.basename(ud.localpath))
2397 os.replace(ud.localpath, mirrorfilename)
2401 self.assertFalse(os.path.exists(ud.localpath))
2403 self.assertTrue(os.path.exists(ud.localpath))
2413 self.assertTrue(os.path.exists(ud.localpath))
2415 mirrordir = os.path.join(self.tempdir, 'mirror')
2417 os.replace(ud.localpath, os.path.join(mirrordir, os.path.basename(ud.localpath)))
2427 self.assertFalse(os.path.exists(ud.localpath))
2429 self.assertTrue(os.path.exists(ud.localpath))
2437 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'foo-bar.tgz')))
2439 unpackdir = os.path.join(self.unpackdir, 'foo', 'bar')
2440 self.assertTrue(os.path.exists(os.path.join(unpackdir, 'package.json')))
2461 unpackdir = os.path.join(self.unpackdir, 'npm')
2462 self.assertTrue(os.path.exists(os.path.join(unpackdir, 'package.json')))
2471 unpackdir = os.path.join(self.unpackdir, 'npm')
2472 self.assertTrue(os.path.exists(os.path.join(unpackdir, 'package.json')))
2481 unpackdir = os.path.join(self.unpackdir, 'npm')
2482 self.assertTrue(os.path.exists(os.path.join(unpackdir, 'package.json')))
2530 datadir = os.path.join(self.tempdir, 'data')
2531 swfile = os.path.join(datadir, 'npm-shrinkwrap.json')
2536 self.sdir = os.path.join(self.unpackdir, 'S')
2566 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz')))
2567 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz')))
2568 … self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git')))
2570 self.assertTrue(os.path.exists(os.path.join(self.sdir, 'npm-shrinkwrap.json')))
2571 …self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.j…
2572 …self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modu…
2573 …self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modu…
2596 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz')))
2597 self.assertFalse(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz')))
2601 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz')))
2602 self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz')))
2619 …self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'foo', 'bar', 'node_modules', 'array-f…
2657 …self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.j…
2680 self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'npm', 'package.json')))
2710 localpath = os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz')
2711 self.assertTrue(os.path.exists(localpath))
2719 self.assertTrue(os.path.exists(localpath + '_bad-checksum_' + badsum))
2720 self.assertTrue(os.path.exists(localpath))
2729 self.assertTrue(os.path.exists(ud.localpath))
2731 mirrordir = os.path.join(self.tempdir, 'mirror')
2733 os.replace(ud.localpath, os.path.join(mirrordir, os.path.basename(ud.localpath)))
2737 self.assertFalse(os.path.exists(ud.localpath))
2749 self.assertTrue(os.path.exists(ud.localpath))
2758 self.assertTrue(os.path.exists(ud.localpath))
2760 mirrordir = os.path.join(self.tempdir, 'mirror')
2762 os.replace(ud.localpath, os.path.join(mirrordir, os.path.basename(ud.localpath)))
2765 self.assertFalse(os.path.exists(ud.localpath))
2777 self.assertTrue(os.path.exists(ud.localpath))
2792 alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates')
2793 self.assertTrue(os.path.exists(alt))
2803 alt = os.path.join(self.unpackdir, 'git/.git/objects/info/alternates')
2804 self.assertFalse(os.path.exists(alt))