Update test framework: fix run_tests.py to support all test files, add auto-import-check for test files

This commit is contained in:
qiaoxinjiu
2026-05-09 15:11:30 +08:00
parent eb053a347f
commit eaba8328da
21739 changed files with 2236758 additions and 719 deletions

View File

@@ -0,0 +1,2 @@
export { ProtobufMetricsSerializer } from './metrics';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,18 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// IMPORTANT: exports added here are public
export { ProtobufMetricsSerializer } from './metrics';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/metrics/protobuf/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,2CAA2C;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// IMPORTANT: exports added here are public\nexport { ProtobufMetricsSerializer } from './metrics';\n"]}

View File

@@ -0,0 +1,5 @@
import { ISerializer } from '../../i-serializer';
import { ResourceMetrics } from '@opentelemetry/sdk-metrics';
import { IExportMetricsServiceResponse } from '../export-response';
export declare const ProtobufMetricsSerializer: ISerializer<ResourceMetrics, IExportMetricsServiceResponse>;
//# sourceMappingURL=metrics.d.ts.map

View File

@@ -0,0 +1,31 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as root from '../../generated/root';
import { createExportMetricsServiceRequest } from '../internal';
const metricsResponseType = root.opentelemetry.proto.collector.metrics.v1
.ExportMetricsServiceResponse;
const metricsRequestType = root.opentelemetry.proto.collector.metrics.v1
.ExportMetricsServiceRequest;
export const ProtobufMetricsSerializer = {
serializeRequest: (arg) => {
const request = createExportMetricsServiceRequest([arg]);
return metricsRequestType.encode(request).finish();
},
deserializeResponse: (arg) => {
return metricsResponseType.decode(arg);
},
};
//# sourceMappingURL=metrics.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../src/metrics/protobuf/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAI7C,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAIhE,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;KACtE,4BAAyE,CAAC;AAE7E,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;KACrE,2BAAuE,CAAC;AAE3E,MAAM,CAAC,MAAM,yBAAyB,GAGlC;IACF,gBAAgB,EAAE,CAAC,GAAoB,EAAE,EAAE;QACzC,MAAM,OAAO,GAAG,iCAAiC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,OAAO,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IACrD,CAAC;IACD,mBAAmB,EAAE,CAAC,GAAe,EAAE,EAAE;QACvC,OAAO,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;CACF,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as root from '../../generated/root';\nimport { ISerializer } from '../../i-serializer';\nimport { IExportMetricsServiceRequest } from '../internal-types';\nimport { ExportType } from '../../common/protobuf/protobuf-export-type';\nimport { createExportMetricsServiceRequest } from '../internal';\nimport { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { IExportMetricsServiceResponse } from '../export-response';\n\nconst metricsResponseType = root.opentelemetry.proto.collector.metrics.v1\n .ExportMetricsServiceResponse as ExportType<IExportMetricsServiceResponse>;\n\nconst metricsRequestType = root.opentelemetry.proto.collector.metrics.v1\n .ExportMetricsServiceRequest as ExportType<IExportMetricsServiceRequest>;\n\nexport const ProtobufMetricsSerializer: ISerializer<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> = {\n serializeRequest: (arg: ResourceMetrics) => {\n const request = createExportMetricsServiceRequest([arg]);\n return metricsRequestType.encode(request).finish();\n },\n deserializeResponse: (arg: Uint8Array) => {\n return metricsResponseType.decode(arg);\n },\n};\n"]}