提交 c40d0d3b 编写于 作者: T TensorFlower Gardener

Merge pull request #41344 from wwwind:16x8_conv_activation_op_tests

PiperOrigin-RevId: 340161487
......@@ -292,9 +292,13 @@ class OpsTest : public ::testing::TestWithParam<string> {};
TEST_P(OpsTest, RunZipTests) {
string test_path_and_label = GetParam();
string test_path = test_path_and_label;
string label = test_path_and_label;
size_t end_pos = test_path_and_label.find(" ");
string test_path = test_path_and_label.substr(0, end_pos);
string label = test_path_and_label.substr(end_pos + 1);
if (end_pos != string::npos) {
test_path = test_path_and_label.substr(0, end_pos);
label = test_path_and_label.substr(end_pos + 1);
}
string tflite_test_case = test_path + "_tests.txt";
string tflite_dir = test_path.substr(0, test_path.find_last_of("/"));
string test_name = label.substr(label.find_last_of('/'));
......
......@@ -350,7 +350,11 @@ def make_zip_of_tests(options,
"%s=%r" % z for z in sorted(zip(keys, curr))).replace(" ", ""))
if label[0] == "/":
label = label[1:]
zip_path_label = label_base_path.replace(".zip", "_") + str(i)
zip_path_label = label
if len(os.path.basename(zip_path_label)) > 245:
zip_path_label = label_base_path.replace(".zip", "_") + str(i)
i += 1
if label in processed_labels:
# Do not populate data for the same label more than once. It will cause
......@@ -493,7 +497,11 @@ def make_zip_of_tests(options,
archive.writestr(zip_path_label + "_tests.txt",
example_fp2.getvalue(), zipfile.ZIP_DEFLATED)
zip_manifest.append(zip_path_label + " " + label + "\n")
zip_manifest_label = zip_path_label + " " + label
if zip_path_label == label:
zip_manifest_label = zip_path_label
zip_manifest.append(zip_manifest_label + "\n")
return tflite_model_binary, report
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册