mirror of https://github.com/KLayout/klayout.git
Consolidated test data for lvs:full - there are too many variants to support pure text compare. We use the netlist comparer now.
This commit is contained in:
parent
fa94c2d8fa
commit
6e6e449eef
|
|
@ -25,10 +25,12 @@
|
||||||
#include "dbTestSupport.h"
|
#include "dbTestSupport.h"
|
||||||
#include "dbNetlist.h"
|
#include "dbNetlist.h"
|
||||||
#include "dbNetlistSpiceReader.h"
|
#include "dbNetlistSpiceReader.h"
|
||||||
|
#include "dbNetlistCompare.h"
|
||||||
|
#include "dbNetlistCrossReference.h"
|
||||||
#include "lymMacro.h"
|
#include "lymMacro.h"
|
||||||
#include "tlFileUtils.h"
|
#include "tlFileUtils.h"
|
||||||
|
|
||||||
void run_test (tl::TestBase *_this, const std::string &suffix, const std::string &layout, bool with_l2n = false, bool with_lvsdb = false)
|
void run_test (tl::TestBase *_this, const std::string &suffix, const std::string &layout)
|
||||||
{
|
{
|
||||||
std::string rs = tl::testsrc ();
|
std::string rs = tl::testsrc ();
|
||||||
rs += "/testdata/lvs/" + suffix + ".lvs";
|
rs += "/testdata/lvs/" + suffix + ".lvs";
|
||||||
|
|
@ -67,13 +69,31 @@ void run_test (tl::TestBase *_this, const std::string &suffix, const std::string
|
||||||
lvs.load_from (rs);
|
lvs.load_from (rs);
|
||||||
EXPECT_EQ (lvs.run (), 0);
|
EXPECT_EQ (lvs.run (), 0);
|
||||||
|
|
||||||
_this->compare_text_files (output_cir, au_cir);
|
db::Netlist nl1, nl2;
|
||||||
if (with_lvsdb) {
|
|
||||||
_this->compare_text_files (output_lvsdb, au_lvsdb);
|
{
|
||||||
|
db::NetlistSpiceReader reader;
|
||||||
|
tl::InputStream stream (output_cir);
|
||||||
|
reader.read (stream, nl1);
|
||||||
}
|
}
|
||||||
if (with_l2n) {
|
|
||||||
_this->compare_text_files (output_l2n, au_l2n);
|
{
|
||||||
|
db::NetlistSpiceReader reader;
|
||||||
|
tl::InputStream stream (au_cir);
|
||||||
|
reader.read (stream, nl2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: it's kind of redundant to use the comparer for checking the LVS
|
||||||
|
// output, but this will essentially verify the output netlist's consistency.
|
||||||
|
db::NetlistCrossReference xref;
|
||||||
|
db::NetlistComparer comparer (&xref);
|
||||||
|
bool res = comparer.compare (&nl1, &nl2);
|
||||||
|
if (! res) {
|
||||||
|
tl::info << "Netlist mismatch:";
|
||||||
|
tl::info << " current: " << output_cir;
|
||||||
|
tl::info << " golden: " << au_cir;
|
||||||
|
}
|
||||||
|
EXPECT_EQ (res, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(1_full)
|
TEST(1_full)
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue