Home
last modified time | relevance | path

Searched refs:tmp_file (Results 1 – 25 of 72) sorted by relevance

123

/external/cronet/build/
Daction_helpers_unittest.py19 tmp_file = pathlib.Path(tempfile.mktemp())
20 tmp_file.write_text('test')
23 orig_mtime = os.path.getmtime(tmp_file)
24 with action_helpers.atomic_output(str(tmp_file), 'wt') as af:
28 self.assertEqual(os.path.getmtime(tmp_file), orig_mtime)
31 with action_helpers.atomic_output(str(tmp_file), 'wt') as af:
33 self.assertEqual(tmp_file.read_text(), 'test2')
34 self.assertNotEqual(os.path.getmtime(tmp_file), orig_mtime)
36 tmp_file.unlink()
50 tmp_file = pathlib.Path(tempfile.mktemp())
[all …]
/external/angle/build/
Daction_helpers_unittest.py19 tmp_file = pathlib.Path(tempfile.mktemp())
20 tmp_file.write_text('test')
23 orig_mtime = os.path.getmtime(tmp_file)
24 with action_helpers.atomic_output(str(tmp_file), 'wt') as af:
28 self.assertEqual(os.path.getmtime(tmp_file), orig_mtime)
31 with action_helpers.atomic_output(str(tmp_file), 'wt') as af:
33 self.assertEqual(tmp_file.read_text(), 'test2')
34 self.assertNotEqual(os.path.getmtime(tmp_file), orig_mtime)
36 tmp_file.unlink()
50 tmp_file = pathlib.Path(tempfile.mktemp())
[all …]
/external/cronet/build/fuchsia/
Dbinary_sizes_test.py68 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
69 tmp_file.write(_EXAMPLE_BLOBS)
70 tmp_file.flush()
72 package_blobs = binary_sizes.ReadPackageBlobsJson(tmp_file.name)
89 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
90 tmp_file.write(_EXAMPLE_BLOBS)
91 tmp_file.flush()
92 blobs = binary_sizes.ReadPackageBlobsJson(tmp_file.name)
97 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
98 binary_sizes.WritePackageSizesJson(tmp_file.name, sizes)
[all …]
/external/angle/build/fuchsia/
Dbinary_sizes_test.py68 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
69 tmp_file.write(_EXAMPLE_BLOBS)
70 tmp_file.flush()
72 package_blobs = binary_sizes.ReadPackageBlobsJson(tmp_file.name)
89 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
90 tmp_file.write(_EXAMPLE_BLOBS)
91 tmp_file.flush()
92 blobs = binary_sizes.ReadPackageBlobsJson(tmp_file.name)
97 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
98 binary_sizes.WritePackageSizesJson(tmp_file.name, sizes)
[all …]
/external/toolchain-utils/afdo_tools/bisection/
De2e_external.sh8 tmp_file=$(mktemp)
9 trap "rm -f '${tmp_file}'" EXIT
10 grep -v '^ ' "$1" > "${tmp_file}"
12 if grep -q bad "${tmp_file}"; then
17 if grep -q 'func_a.*2' "${tmp_file}"; then
22 if grep -q 'func_b.*4' "${tmp_file}" && \
23 grep -q 'func_c.*6' "${tmp_file}" && \
24 grep -q 'func_d.*8' "${tmp_file}"; then
Dstate_assumption_external.sh26 tmp_file=$(mktemp)
27 trap "rm -f '${tmp_file}'" EXIT
28 grep -v '^ ' "$1" > "${tmp_file}"
37 if grep -q 'func_a.*2' "${tmp_file}"; then
/external/pigweed/pw_transfer/
Datomic_file_transfer_handler.cc95 const std::string tmp_file = GetTempFilePath(path_); in PrepareWrite() local
96 PW_LOG_DEBUG("Preparing write for file %s", tmp_file.c_str()); in PrepareWrite()
97 set_writer(stream_.emplace<stream::StdFileWriter>(tmp_file.c_str())); in PrepareWrite()
103 auto tmp_file = GetTempFilePath(path_); in FinalizeWrite() local
104 if (!status.ok() || !std::filesystem::exists(tmp_file) || in FinalizeWrite()
105 std::filesystem::is_empty(tmp_file)) { in FinalizeWrite()
107 tmp_file.c_str()); in FinalizeWrite()
109 return std::filesystem::remove(tmp_file) ? status : Status::Aborted(); in FinalizeWrite()
114 std::filesystem::remove(tmp_file); in FinalizeWrite()
119 "Copying file from: %s, to: %s", tmp_file.c_str(), path_.c_str()); in FinalizeWrite()
[all …]
/external/angle/build/android/pylib/utils/
Dtest_filter_test.py95 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
96 tmp_file.write('positive1\npositive2\n-negative2\n-negative3\n')
97 tmp_file.seek(0)
101 tmp_file.name])
111 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
112 tmp_file.write('-negative2\n-negative3\n')
113 tmp_file.seek(0)
118 tmp_file.name])
128 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
129 tmp_file.write('positive2-negative2\n')
[all …]
/external/cronet/build/android/pylib/utils/
Dtest_filter_test.py95 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
96 tmp_file.write('positive1\npositive2\n-negative2\n-negative3\n')
97 tmp_file.seek(0)
101 tmp_file.name])
111 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
112 tmp_file.write('-negative2\n-negative3\n')
113 tmp_file.seek(0)
118 tmp_file.name])
128 with tempfile.NamedTemporaryFile(mode='w') as tmp_file:
129 tmp_file.write('positive2-negative2\n')
[all …]
/external/linux-kselftest/tools/testing/selftests/
Dkselftest_deps.sh64 tmp_file=$(mktemp).c
65 trap "rm -f $tmp_file.o $tmp_file $tmp_file.bin" EXIT
77 cat << "EOF" > $tmp_file
211 $CC -o $tmp_file.bin $lib $tmp_file > /dev/null 2>&1
/external/chromium-trace/catapult/common/eslint/eslint/
Dsmoke_test.py27 tmp_file = tempfile.NamedTemporaryFile(
29 tmp_file.write(_TEMP_FILE_CONTENTS)
30 tmp_file.close()
32 success, output = eslint.RunEslint([tmp_file.name])
36 os.remove(tmp_file.name)
/external/cronet/base/files/
Dimportant_file_writer.cc73 void DeleteTmpFileWithRetry(File tmp_file, in DeleteTmpFileWithRetry() argument
78 if (tmp_file.IsValid()) { in DeleteTmpFileWithRetry()
79 if (tmp_file.DeleteOnClose(true)) in DeleteTmpFileWithRetry()
85 tmp_file.Close(); in DeleteTmpFileWithRetry()
182 File tmp_file = in WriteFileAtomicallyImpl() local
184 if (!tmp_file.IsValid()) { in WriteFileAtomicallyImpl()
198 bytes_written = tmp_file.WriteAtCurrentPos(scan, write_amount); in WriteFileAtomicallyImpl()
203 DeleteTmpFileWithRetry(std::move(tmp_file), tmp_file_path); in WriteFileAtomicallyImpl()
208 if (!tmp_file.Flush()) { in WriteFileAtomicallyImpl()
210 DeleteTmpFileWithRetry(std::move(tmp_file), tmp_file_path); in WriteFileAtomicallyImpl()
[all …]
/external/perfetto/src/traceconv/
Dtrace_to_text_unittest.cc48 auto tmp_file = "/tmp/trace_" + std::to_string(rand()) + ".txt"; in TEST() local
51 PERFETTO_LOG("tmp_file = %s.", tmp_file.c_str()); in TEST()
55 std::ofstream output_f(tmp_file, std::ios::out | std::ios::binary); in TEST()
59 EXPECT_EQ(0xCD794377594BC7DCull, FileHash(tmp_file)); in TEST()
60 remove(tmp_file.c_str()); in TEST()
/external/perfetto/src/tracing/ipc/
Dposix_shared_memory_unittest.cc77 base::TempFile tmp_file = base::TempFile::CreateUnlinked(); in TEST() local
78 const int fd_num = tmp_file.fd(); in TEST()
83 tmp_file.ReleaseFD(), /*require_seals_if_supported=*/false); in TEST()
99 base::TempFile tmp_file = base::TempFile::CreateUnlinked(); in TEST() local
100 const int fd_num = tmp_file.fd(); in TEST()
104 PosixSharedMemory::AttachToFd(tmp_file.ReleaseFD()); in TEST()
/external/tensorflow/tensorflow/compiler/xla/
Dparse_flags_from_env_test.cc96 std::string tmp_file = in TEST() local
98 FILE* fp = fopen(tmp_file.c_str(), "w"); in TEST()
99 CHECK_NE(fp, nullptr) << "can't write to " << tmp_file; in TEST()
104 CHECK_EQ(ferror(fp), 0) << "writes failed to " << tmp_file; in TEST()
107 tensorflow::setenv("TF_XLA_FLAGS", tmp_file.c_str(), true /*overwrite*/); in TEST()
109 unlink(tmp_file.c_str()); in TEST()
/external/angle/build/android/gyp/
Dsystem_image_apks.py35 with tempfile.NamedTemporaryFile(suffix='.apks') as tmp_file:
37 args.bundle_wrapper, 'build-bundle-apks', '--output-apks', tmp_file.name
45 with zipfile.ZipFile(tmp_file.name) as z:
51 with zipfile.ZipFile(tmp_file.name) as z_input, \
/external/cronet/build/android/gyp/
Dsystem_image_apks.py35 with tempfile.NamedTemporaryFile(suffix='.apks') as tmp_file:
37 args.bundle_wrapper, 'build-bundle-apks', '--output-apks', tmp_file.name
45 with zipfile.ZipFile(tmp_file.name) as z:
51 with zipfile.ZipFile(tmp_file.name) as z_input, \
/external/chromium-trace/catapult/systrace/atrace_helper/jni/
Dmain.cc108 char tmp_file[PATH_MAX]; in main() local
111 sprintf(tmp_file, "%s.tmp", out_file); in main()
112 out_stream = fopen(tmp_file, "w"); in main()
133 rename(tmp_file, out_file); in main()
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/python_utils/
Ddownload_and_unzip.py32 with tempfile.TemporaryFile() as tmp_file:
39 tmp_file.write(r.content)
41 with zipfile.ZipFile(tmp_file, 'r') as target_zip_file:
/external/perfetto/src/traced/probes/filesystem/
Dfs_mount_unittest.cc54 base::TempFile tmp_file = base::TempFile::Create(); in TEST() local
55 ASSERT_EQ(base::WriteAll(tmp_file.fd(), kMounts, sizeof(kMounts)), in TEST()
58 ParseMounts(tmp_file.path().c_str()); in TEST()
/external/puffin/src/
Dintegration_test.cc65 std::string tmp_file; in TEST_P() local
66 ASSERT_TRUE(MakeTempFile(&tmp_file, nullptr)); in TEST_P()
71 getPatchType(), tmp_file, &patch)); in TEST_P()
/external/libchrome/base/files/
Dimportant_file_writer.cc166 File tmp_file(tmp_file_path, File::FLAG_OPEN | File::FLAG_WRITE); in WriteFileAtomically() local
167 if (!tmp_file.IsValid()) { in WriteFileAtomically()
170 -tmp_file.error_details(), -base::File::FILE_ERROR_MAX); in WriteFileAtomically()
179 int bytes_written = tmp_file.Write(0, data.data(), data_length); in WriteFileAtomically()
185 bool flush_success = tmp_file.Flush(); in WriteFileAtomically()
186 tmp_file.Close(); in WriteFileAtomically()
/external/tensorflow/tensorflow/python/distribute/coordinator/
Dwatchdog_test.py30 tmp_file = self.create_tempfile()
31 f = open(tmp_file, "w+")
61 with open(tmp_file) as f:
/external/oss-fuzz/infra/cifuzz/
Dhttp_utils.py52 with tempfile.NamedTemporaryFile(suffix='.zip') as tmp_file:
53 if not download_url(url, tmp_file.name, headers=headers):
57 with zipfile.ZipFile(tmp_file.name, 'r') as zip_file:
/external/bcc/tools/
Drunqlen.py92 tmp_file = NamedTemporaryFile(delete=False)
93 tmp_file.close();
101 fd = open(tmp_file.name, O_WRONLY)
114 unlink(tmp_file.name)

123