From 9848b20c1e2e8ebd3bab4ba37208a85bb3228f7c Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mar 09 2017 05:43:53 +0000 Subject: Update to 6.08.06 Drop obsolete patch: root-tformulaparsingtests.patch Drop patches accepted upstream: root-spectrum-batch.patch and root-missing-header-gcc7.patch Disable failing tests on s390x --- diff --git a/root-32bit.patch b/root-32bit.patch index ecd62a4..75a9eae 100644 --- a/root-32bit.patch +++ b/root-32bit.patch @@ -12,10 +12,10 @@ index d768160..8c223ee 100644 iret |= compare("legendre(10, -0.5) ", legendre(10, -0.5), -0.1882286071777345); diff --git a/test/stressMathCore.cxx b/test/stressMathCore.cxx -index 1006dd1..5dc96ee 100644 +index 1006dd1..b862f36 100644 --- a/test/stressMathCore.cxx +++ b/test/stressMathCore.cxx -@@ -1117,11 +1117,11 @@ int testVector(int ngen, bool testio=false) { +@@ -1117,7 +1117,7 @@ int testVector(int ngen, bool testio=false) { s1 = a.testOperations(v1); a.print(VecType::name()+" operations"); scale = Dim*20; @@ -24,8 +24,3 @@ index 1006dd1..5dc96ee 100644 if (Dim==4 && VecType::name() == "PtEtaPhiMVector") scale *= 10; #if defined (R__LINUX) && !defined(R__B64) // problem of precision on linux 32 -- if (Dim ==4) scale = 1000000000; -+ if (Dim ==4) scale = 5000000000; - #endif - // for problem with PtEtaPhiE - if (Dim==4 && VecType::name() == "PtEtaPhiEVector") scale = 0.01/(std::numeric_limits::epsilon()); diff --git a/root-TPad-WaitPrimitive.patch b/root-TPad-WaitPrimitive.patch index 5e849d5..ca329e3 100644 --- a/root-TPad-WaitPrimitive.patch +++ b/root-TPad-WaitPrimitive.patch @@ -1,5 +1,5 @@ diff --git a/graf2d/gpad/src/TPad.cxx b/graf2d/gpad/src/TPad.cxx -index 06bd216..6efeec5 100644 +index 2b2b5b8..6efeec5 100644 --- a/graf2d/gpad/src/TPad.cxx +++ b/graf2d/gpad/src/TPad.cxx @@ -6312,6 +6312,8 @@ void TPad::UseCurrentStyle() @@ -15,7 +15,7 @@ index 06bd216..6efeec5 100644 Bool_t hasname = strlen(pname) > 0; if (!pname[0] && !emode[0]) testlast = kTRUE; if (testlast) gROOT->SetEditorMode(); -- while (!gSystem->ProcessEvents() && gROOT->GetSelectedPad()) { +- while (!gSystem->ProcessEvents()) { + while (!gSystem->ProcessEvents() && gPad) { if (gROOT->GetEditorMode() == 0) { if (hasname) { diff --git a/root-missing-header-gcc7.patch b/root-missing-header-gcc7.patch deleted file mode 100644 index 1a2e2bd..0000000 --- a/root-missing-header-gcc7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/test/stressEntryList.cxx b/test/stressEntryList.cxx -index e39a80b..ee6303b 100644 ---- a/test/stressEntryList.cxx -+++ b/test/stressEntryList.cxx -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - #include - #include "TApplication.h" - #include "TEntryList.h" diff --git a/root-s390x.patch b/root-s390x.patch new file mode 100644 index 0000000..733061e --- /dev/null +++ b/root-s390x.patch @@ -0,0 +1,23 @@ +diff --git a/config/root-config.in b/config/root-config.in +index bdb90ad..1b4cdba 100755 +--- a/config/root-config.in ++++ b/config/root-config.in +@@ -247,6 +247,18 @@ linuxarm64) + auxcflags="${cxxversionflag} -fsigned-char" + auxlibs="-lm -ldl -rdynamic" + ;; ++linuxs390gcc) ++ # s390 (31 bit mode) Linux with gcc ++ auxcflags="${cxxversionflag} -m31 -fsigned-char" ++ auxldflags="-m31" ++ auxlibs="-lm -ldl -rdynamic" ++ ;; ++linuxs390xgcc) ++ # s390x (64 bit mode) Linux with gcc ++ auxcflags="${cxxversionflag} -m64 -fsigned-char" ++ auxldflags="-m64" ++ auxlibs="-lm -ldl -rdynamic" ++ ;; + freebsd) + # FreeBSD with libc5 + auxcflags="${cxxversionflag}" diff --git a/root-spectrum-batch.patch b/root-spectrum-batch.patch deleted file mode 100644 index 6254cae..0000000 --- a/root-spectrum-batch.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/tutorials/spectrum/peaks2.C b/tutorials/spectrum/peaks2.C -index 76cc5ab..f05d394 100644 ---- a/tutorials/spectrum/peaks2.C -+++ b/tutorials/spectrum/peaks2.C -@@ -107,8 +107,10 @@ void findPeak2() { - - s->Print(); - printf("Gener=%d, Found=%d, Good=%d, Ghost=%d\n",npeaks,nfound,ngood,nghost); -- printf("\nDouble click in the bottom right corner of the pad to continue\n"); -- c1->WaitPrimitive(); -+ if (!gROOT->IsBatch()) { -+ printf("\nDouble click in the bottom right corner of the pad to continue\n"); -+ c1->WaitPrimitive(); -+ } - } - void peaks2(Int_t maxpeaks=50) { - s = new TSpectrum2(2*maxpeaks); diff --git a/root-template-files.patch b/root-template-files.patch index 73a8c62..fcf91e6 100644 --- a/root-template-files.patch +++ b/root-template-files.patch @@ -1,34 +1,30 @@ diff --git a/tutorials/mlp/mlpHiggs.C b/tutorials/mlp/mlpHiggs.C -index 8c5743f..d2a2769 100644 +index 8c5743f..49d3ca2 100644 --- a/tutorials/mlp/mlpHiggs.C +++ b/tutorials/mlp/mlpHiggs.C -@@ -16,8 +16,8 @@ - void mlpHiggs(Int_t ntrain=100) { - const char *fname = "mlpHiggs.root"; +@@ -18,6 +18,8 @@ void mlpHiggs(Int_t ntrain=100) { TFile *input = 0; -- if (!gSystem->AccessPathName(fname)) { -- input = TFile::Open(fname); -+ if (!gSystem->AccessPathName(Form("%s/%s", gSystem->DirName(__FILE__), fname))) { -+ input = TFile::Open(Form("%s/%s", gSystem->DirName(__FILE__), fname)); + if (!gSystem->AccessPathName(fname)) { + input = TFile::Open(fname); ++ } else if (!gSystem->AccessPathName(Form("%s/mlp/%s", TROOT::GetTutorialDir().Data(), fname))) { ++ input = TFile::Open(Form("%s/mlp/%s", TROOT::GetTutorialDir().Data(), fname)); } else { printf("accessing %s file from http://root.cern.ch/files\n",fname); input = TFile::Open(Form("http://root.cern.ch/files/%s",fname)); diff --git a/tutorials/quadp/portfolio.C b/tutorials/quadp/portfolio.C -index 9f8bb8a..ca96365 100644 +index 9f8bb8a..6c39446 100644 --- a/tutorials/quadp/portfolio.C +++ b/tutorials/quadp/portfolio.C -@@ -289,8 +289,8 @@ void portfolio() - - const char *fname = "stock.root"; +@@ -291,6 +291,8 @@ void portfolio() TFile *f = 0; -- if (!gSystem->AccessPathName(fname)) { -- f = TFile::Open(fname); -+ if (!gSystem->AccessPathName(Form("%s/%s", gSystem->DirName(__FILE__), fname))) { -+ f = TFile::Open(Form("%s/%s", gSystem->DirName(__FILE__), fname)); + if (!gSystem->AccessPathName(fname)) { + f = TFile::Open(fname); ++ } else if (!gSystem->AccessPathName(Form("%s/quadp/%s", TROOT::GetTutorialDir().Data(), fname))) { ++ f = TFile::Open(Form("%s/quadp/%s", TROOT::GetTutorialDir().Data(), fname)); } else { printf("accessing %s file from http://root.cern.ch/files\n",fname); f = TFile::Open(Form("http://root.cern.ch/files/%s",fname)); -@@ -314,7 +314,7 @@ void portfolio() +@@ -314,7 +316,7 @@ void portfolio() for (Int_t j = 0; j <= i; j++) { Double_t sum = 0.; for (Int_t k = 0; k < nrData; k++) diff --git a/root-tformulaparsingtests.patch b/root-tformulaparsingtests.patch deleted file mode 100644 index 956c6dc..0000000 --- a/root-tformulaparsingtests.patch +++ /dev/null @@ -1,934 +0,0 @@ -diff --git a/test/TFormulaParsingTests.h b/test/TFormulaParsingTests.h -index 060d149..4a2957c 100644 ---- a/test/TFormulaParsingTests.h -+++ b/test/TFormulaParsingTests.h -@@ -6,26 +6,26 @@ - #include "TMath.h" - #include "Math/ChebyshevPol.h" - --#include --#include - #include - // test of tformula neeeded to be run - -- - class TFormulaParsingTests { - -- --bool verbose; --std::vector failedTests; -+bool verbose; -+std::vector failedTests; - - // We need a softer way to reason about equality in 32 bits - // Being this a quick test, doing the check at runtime is really no problem. --bool fpEqual(double x, double y, bool epsilon = false) -+bool fpEqual(double x, double y, double epsilon = 0.) - { -- bool isEqual = epsilon ? std::abs(x-y) <= std::numeric_limits::epsilon() : x == y; -+ bool isEqual; -+ if (epsilon == 0.) -+ isEqual = (x == y); -+ else -+ isEqual = TMath::AreEqualAbs(x, y, epsilon); - if (!isEqual) { -- // std::hexfloat not there for older gcc versions -- printf("\nThe numbers differ: %A and %A\n", x, y); -+ // std::hexfloat not there for older gcc versions -+ printf("\nThe numbers differ: %A and %A\n", x, y); - } - return isEqual; - } -@@ -42,65 +42,53 @@ bool test1() { - f2.SetParameters(1,2,3,4); - - return (f2.Eval(2) == 39.); -- - } - - bool test2() { -- - TF1 f1("f1","[0]+[1]*x"); - TF1 f2("f2","[0]+[1]*x*f1"); - -- TF1 f3("f3",f2.GetExpFormula() ); -+ TF1 f3("f3",f2.GetExpFormula()); - - f3.SetParameters(1,2,3,4); - - return (f3.Eval(2) == 45.); -- - } - -- - bool test3() { -- -- // still tets composition of functions -+ // still test composition of functions - TF1 f1("f1","gaus"); - TF1 f2("f2","[0]+[1]*x+f1"); - -- - f2.SetParameters(10,2,5,2,1); - -- f1.SetParameters(5,2,1); -- -- return (f2.Eval(2) == (10. + 2*2 + f1.Eval(2)) ); -+ f1.SetParameters(5,2,1); - -+ return (f2.Eval(2) == (10. + 2*2 + f1.Eval(2))); - } - - bool test4() { -- - // similar but with different name (it contains gaus) - TF1 f1("fgaus","gaus"); - TF1 f2("f2","[0]+[1]*x+fgaus"); - -- - f2.SetParameters(10,2,5,2,1); - -- f1.SetParameters(5,2,1); -- -- return (f2.Eval(2) == (10. + 2*2 + f1.Eval(2)) ); -+ f1.SetParameters(5,2,1); - -+ return (f2.Eval(2) == (10. + 2*2 + f1.Eval(2))); - } --bool test5() { - -+bool test5() { - // similar but with different name (it contains gaus) - TF1 f1("gausnfunc","gaus"); - TF1 f2("f2","[0]+[1]*x+gausnfunc"); - -- - f2.SetParameters(10,2,5,2,1); - -- f1.SetParameters(5,2,1); -- -- return (f2.Eval(2) == (10. + 2*2 + f1.Eval(2)) ); -+ f1.SetParameters(5,2,1); - -+ return (f2.Eval(2) == (10. + 2*2 + f1.Eval(2))); - } - - bool test1a() { -@@ -111,10 +99,9 @@ bool test1a() { - return true; - } - -- - bool test6() { - // test linear function used in fitting -- bool ok = true; -+ bool ok = true; - double x[] = {1,2,3,4,5}; - double y[] = {1,4,7,9,10}; - TGraph g(5,x,y); -@@ -122,7 +109,7 @@ bool test6() { - int iret = g.Fit("x++1","Q"); - ok &= (iret == 0); - iret = g.Fit("1++x","Q"); -- return iret == 0; -+ return iret == 0; - } - - bool test7() { -@@ -130,45 +117,44 @@ bool test7() { - TF1 * f1 = new TF1("f1","1++x"); - if (f1->GetNpar() != 2) return false; - f1->SetParameters(2,3); -- if (f1->Eval(3) != 11) return false; -+ if (f1->Eval(3) != 11) return false; - -- if (verbose) printf("Test7: test linear part1 of function\n"); -+ if (verbose) printf("Test7: test linear part1 of function\n"); - TFormula * lin1 = (TFormula*) f1->GetLinearPart(1); - assert (lin1); -- if (lin1->Eval(3) != 3) return false; -+ if (lin1->Eval(3) != 3) return false; -+ -+ if (verbose) printf("Test7: test copying linear function\n"); - -- if (verbose) printf("Test7: test copying linear function\n"); -- - TF1 * f2 = new TF1(*f1); -- if (f2->Eval(3) != 11) return false; -+ if (f2->Eval(3) != 11) return false; - - if (verbose) printf("Test7: test linear part1 of copied function\n"); -- if (!f2->IsLinear()) return false; -+ if (!f2->IsLinear()) return false; - lin1 = (TFormula*) f2->GetLinearPart(1); - assert (lin1); -- if (lin1->Eval(3) != 3) return false; -+ if (lin1->Eval(3) != 3) return false; - - delete f1; - -- if (verbose) printf("Test7: test cloning linear function\n"); -+ if (verbose) printf("Test7: test cloning linear function\n"); - - TF1 * f3 = (TF1*) f2->Clone("f3"); -- if (f3->Eval(3) != 11) return false; -+ if (f3->Eval(3) != 11) return false; - -- if (verbose) printf("Test7: test deleting the copied function\n"); -+ if (verbose) printf("Test7: test deleting the copied function\n"); - delete f2; - -- if (verbose) printf("Test7: test linear part1 of cloned function\n"); -- if (!f3->IsLinear()) return false; -+ if (verbose) printf("Test7: test linear part1 of cloned function\n"); -+ if (!f3->IsLinear()) return false; - lin1 = (TFormula*) f3->GetLinearPart(1); - assert (lin1); -- if (verbose) printf("Test7: test evaluating linear part1 of cloned function\n"); -- if (lin1->Eval(3) != 3) return false; -- -+ if (verbose) printf("Test7: test evaluating linear part1 of cloned function\n"); -+ if (lin1->Eval(3) != 3) return false; - -- if (verbose) printf("Test7: test deleting the cloned function\n"); -- delete f3; -- return true; -+ if (verbose) printf("Test7: test deleting the cloned function\n"); -+ delete f3; -+ return true; - } - - bool test8() { -@@ -178,39 +164,38 @@ bool test8() { - f = new TFormula("f","x^y"); - - ok &= (f->Eval(2,3) == 8); -- delete f; -+ delete f; - - f = new TFormula("f","(x+[0])^y"); - f->SetParameter(0,1); - ok &= (f->Eval(2,3) == 27); -- delete f; -+ delete f; - - f = new TFormula("f","sqrt(x+[0])^y"); - f->SetParameter(0,2); - ok &= (f->Eval(2,3) == 8); -- delete f; -+ delete f; - - f = new TFormula("f","[0]/((x+2)^y)"); - f->SetParameter(0,27); - ok &= (f->Eval(1,3) == 1); -- delete f; -- -+ delete f; -+ - f = new TFormula("f","[0]/((x+2)^(y+1))"); - f->SetParameter(0,27); - ok &= (f->Eval(1,2) == 1); -- delete f; -+ delete f; - - // test also nested operators - f = new TFormula("f","((x+1)^y)^z"); - ok &= (f->Eval(1,3,4) == 4096); -- delete f; -+ delete f; - - f = new TFormula("f","x^((y+1)^z)"); - ok &= (f->Eval(2,1,3) == 256); - delete f; -- -+ - return ok; -- - } - - bool test9() { -@@ -220,7 +205,7 @@ bool test9() { - TFormula * f = 0; - f = new TFormula("f","x+2.0e1"); - ok &= (f->Eval(1) == 21.); -- -+ - f = new TFormula("f","x*2.e-1"); - ok &= (f->Eval(10) == 2.); - -@@ -232,25 +217,23 @@ bool test9() { - - delete f; - return ok; -- -- - } - - bool test10() { - // test the operator "? : " - bool ok = true; - TFormula * f = 0; -- f = new TFormula("f","(x<0)?-x:x"); -- ok &= (f->Eval(-2) == 2); -+ f = new TFormula("f","(x<0)?-x:x"); -+ ok &= (f->Eval(-2) == 2); - ok &= (f->Eval(2) == 2); - - f = new TFormula("f","(x<0)?x:pol2"); - f->SetParameters(1,2,3); -- ok &= (f->Eval(-2) == -2); -- ok &= (f->Eval(2) == 1 + 2*2 + 2*2*3); -+ ok &= (f->Eval(-2) == -2); -+ ok &= (f->Eval(2) == 1 + 2*2 + 2*2*3); - - delete f; -- return ok; -+ return ok; - } - - bool test11() { -@@ -260,17 +243,18 @@ bool test11() { - TFormula f1("f","ROOT::Math::normal_pdf(x,1,2)"); - TFormula f2("f","[0]+TMath::Gaus(x,2,1,true)"); - f2.SetParameter(0,1); -- ok &= ( (f1.Eval(2) +1. ) == f2.Eval(2) ); -+ ok &= ((f1.Eval(2) + 1.) == f2.Eval(2)); - return ok; - } --bool test12() { -- // test parameters order -- bool ok = true; -- TFormula * f = 0; -+ -+bool test12() { -+ // test parameters order -+ bool ok = true; -+ TFormula * f = 0; - f = new TFormula("f","[2] + [3]*x + [0]*x^2 + [1]*x^3"); - f->SetParameters(1,2,3,4); - double result = 3+4*2+1*4+2*8; -- ok &= (f->Eval(2) == result); -+ ok &= (f->Eval(2) == result); - f = new TFormula("f","[b] + [c]*x + [d]*x^2 + [a]*x^3"); - f->SetParameters(1,2,3,4); - result = 2+3*2+4*4+1*8; -@@ -281,29 +265,32 @@ bool test12() { - return ok; - } - --bool test13() { -+bool test13() { - // test GetExpFormula - TFormula f("f","[2] + [0]*x + [1]*x*x"); - f.SetParameters(1,2,3); - return (f.GetExpFormula() == TString("[p2]+[p0]*x+[p1]*x*x")); - } --bool test14() { -+ -+bool test14() { - // test GetExpFormula - TFormula f("f","[2] + [0]*x + [1]*x*x"); - f.SetParameters(1,2,3); - return (f.GetExpFormula("P") == TString("3+1*x+2*x*x")); - } --bool test15() { -+ -+bool test15() { - // test GetExpFormula - TFormula f("f","[2] + [0]*x + [1]*x*x"); - f.SetParameters(1,2,3); -- return (f.GetExpFormula("CLING") == TString("p[2]+p[0]*x[0]+p[1]*x[0]*x[0] ") ); // need an extra white space -+ return (f.GetExpFormula("CLING") == TString("p[2]+p[0]*x[0]+p[1]*x[0]*x[0] ")); // need an extra white space - } --bool test16() { -+ -+bool test16() { - // test GetExpFormula - TFormula f("f","[2] + [0]*x + [1]*x*x"); - f.SetParameters(1,2,3); -- return (f.GetExpFormula("CLING P") == TString("3.000000+1.000000*x[0]+2.000000*x[0]*x[0] ") ); -+ return (f.GetExpFormula("CLING P") == TString("3.000000+1.000000*x[0]+2.000000*x[0]*x[0] ")); - } - - bool test17() { -@@ -312,10 +299,10 @@ bool test17() { - f1->SetParameters(2,3); - TF1 * f0 = new TF1("f0",[](double *x, double *p){ return p[0]*sin(p[1]*x[0]); },0,10,2); - f0->SetParameters(2,3); -- bool ok = true; -- ok &= fpEqual(f1->Eval(1.5) , f0->Eval(1.5) ); -+ bool ok = true; -+ ok &= fpEqual(f1->Eval(1.5), f0->Eval(1.5)); - double xx[1] = {2.5}; -- ok &= fpEqual(f1->EvalPar(xx) , f0->Eval(2.5) ); -+ ok &= fpEqual(f1->EvalPar(xx), f0->Eval(2.5)); - return ok; - } - -@@ -325,12 +312,12 @@ bool test18() { - f1->SetParameters(2,3); - TF2 * f0 = new TF2("f0",[](double *x, double *p){ return p[0]*sin(p[1]*x[0]*x[1]); },0,10,0,10,2); - f0->SetParameters(2,3); -- bool ok = true; -- ok &= fpEqual(f1->Eval(1.5,2.5) , f0->Eval(1.5,2.5) ); -+ bool ok = true; -+ ok &= fpEqual(f1->Eval(1.5,2.5), f0->Eval(1.5,2.5)); - double par[2] = {3,4}; - double xx[2] = {0.8,1.6}; -- ok &= fpEqual(f1->EvalPar(xx,par) , f0->EvalPar(xx,par) ); -- return ok; -+ ok &= fpEqual(f1->EvalPar(xx,par), f0->EvalPar(xx,par), 2e-16); -+ return ok; - } - - bool test19() { -@@ -339,12 +326,12 @@ bool test19() { - f1->SetParameters(2,3); - TF3 * f0 = new TF3("f0",[](double *x, double *p){ return p[0]*sin(p[1]*x[0]*x[1]*x[2]); },0,10,0,10,0,10,2); - f0->SetParameters(2,3); -- bool ok = true; -- ok &= fpEqual(f1->Eval(1.5,2.5,3.5) , f0->Eval(1.5,2.5,3.5) ); -+ bool ok = true; -+ ok &= fpEqual(f1->Eval(1.5,2.5,3.5), f0->Eval(1.5,2.5,3.5)); - double par[2] = {3,4}; - double xx[3] = {0.8,1.6,2.2}; -- ok &= fpEqual(f1->EvalPar(xx,par) , f0->EvalPar(xx,par) ); -- return ok; -+ ok &= fpEqual(f1->EvalPar(xx,par), f0->EvalPar(xx,par), 2e-16); -+ return ok; - } - - bool test20() { -@@ -353,12 +340,12 @@ bool test20() { - double params[16] = {1,0,1,1,1, 2,-1,2,0,2, 2,1,3,-1,2, 10}; - f2.SetParameters(params); - TF2 f0("f2",[](double *x, double *p){ return p[0]*TMath::Gaus(x[0],p[1],p[2])*TMath::Gaus(x[1],p[3],p[4]) + -- p[5]*TMath::Gaus(x[0],p[6],p[7])*TMath::Gaus(x[1],p[8],p[9]) + -+ p[5]*TMath::Gaus(x[0],p[6],p[7])*TMath::Gaus(x[1],p[8],p[9]) + - p[10]*TMath::Gaus(x[0],p[11],p[12])*TMath::Gaus(x[1],p[13],p[14]) + p[15]; }, - -10,10,-10,10,16); - double xx[2]={1,2}; -- //printf(" difference = %f , value %f \n", f2.Eval(1,2) - f0.EvalPar(xx,params), f2.Eval(1,2) ); -- return fpEqual( f2.Eval(1,2) , f0.EvalPar(xx,params) ); -+ //printf(" difference = %f, value %f \n", f2.Eval(1,2) - f0.EvalPar(xx,params), f2.Eval(1,2)); -+ return fpEqual(f2.Eval(1,2), f0.EvalPar(xx,params)); - } - - bool test21() { -@@ -366,8 +353,8 @@ bool test21() { - TFormula f("f","pol2+gaus(3)"); - f.SetParameters(1,2,3,1,0,1); - TF1 f0("f0",[](double *x, double *p){ return p[0]+x[0]*p[1]+x[0]*x[0]*p[2]+p[3]*TMath::Gaus(x[0],p[4],p[5]); },0,1,6); -- f0.SetParameters(f.GetParameters() ); -- return fpEqual(f.Eval(2) , f0.Eval(2) ); -+ f0.SetParameters(f.GetParameters()); -+ return fpEqual(f.Eval(2), f0.Eval(2)); - } - - bool test22() { -@@ -375,36 +362,36 @@ bool test22() { - TF1 f("f","cheb10+[offset]"); - double p[12] = {1,1,1,1,1,1,1,1,1,1,1,10 }; - f.SetParameters(p); -- return (f.Eval(0.5) == ROOT::Math::ChebyshevN(10, 0.5, p ) + f.GetParameter("offset")); -+ return (f.Eval(0.5) == ROOT::Math::ChebyshevN(10, 0.5, p) + f.GetParameter("offset")); - } - - bool test23() { - // fix function compositions using pre-defined functions -- bool ok = true; -+ bool ok = true; - TF1 f1("f1","gaus"); - TF1 f2("f2","[0]+f1"); -- TF1 f0("f0",[](double *x, double *p){ return p[0]+p[1]*TMath::Gaus(x[0],p[2],p[3]); },-3,3,4 ); -+ TF1 f0("f0",[](double *x, double *p){ return p[0]+p[1]*TMath::Gaus(x[0],p[2],p[3]); },-3,3,4); - f2.SetParameters(10,1,0,1); -- f0.SetParameters(f2.GetParameters() ); -- ok &= fpEqual(f2.Eval(1) , f0.Eval(1) ); -+ f0.SetParameters(f2.GetParameters()); -+ ok &= fpEqual(f2.Eval(1), f0.Eval(1), 7e-16); - - TF1 f3("f3","f1+[0]"); - // param order should be the same -- f3.SetParameters( f2.GetParameters() ); -- ok &= fpEqual(f3.Eval(1) , f0.Eval(1) ); -+ f3.SetParameters(f2.GetParameters()); -+ ok &= fpEqual(f3.Eval(1), f0.Eval(1), 7e-16); - return ok; - } - - bool test24() { - // test I/O for parameter ordering -- bool ok = true; -+ bool ok = true; - TF2 f("f","xygaus"); - f.SetParameters(10,0,1,-1,2); - TF2 * f2 = (TF2*) f.Clone(); -- ok &= ( f.Eval(1,1) == f2->Eval(1,1) ); -+ ok &= (f.Eval(1,1) == f2->Eval(1,1)); - // test with copy - TF2 f3(f); -- ok &= ( f.Eval(1,1) == f3.Eval(1,1) ); -+ ok &= (f.Eval(1,1) == f3.Eval(1,1)); - return ok; - } - -@@ -412,61 +399,61 @@ bool test25() { - // fix parsing of operator^ (ROOT-7349) - bool ok = true; - TF1 f1("f1","x^-2.5"); -- ok &= (f1.Eval(3.) == TMath::Power(3,-2.5) ); -- if (!ok) std::cout << "Error in test25 - f != x^-2.5 " << f1.Eval(3.) << " " << TMath::Power(3,-2.5) << std::endl; -+ ok &= (f1.Eval(3.) == TMath::Power(3,-2.5)); -+ if (!ok) std::cout << "Error in test25 - f != x^-2.5 " << f1.Eval(3.) << " " << TMath::Power(3,-2.5) << std::endl; - - TF1 f2("f2","x^+2.5"); - //TF1 f3("f3","std::pow(x,2.5)"); // this needed to be fixed - TF1 f3("f3","TMath::Power(x,2.5)"); -- bool ret = (f2.Eval(3.) == f3.Eval(3) ); -- if (!ret) std::cout << "Error in test25 - f2 != f3 " << f2.Eval(3.) << " " << f3.Eval(3.) << std::endl; -- ok &= ret; -+ bool ret = (f2.Eval(3.) == f3.Eval(3)); -+ if (!ret) std::cout << "Error in test25 - f2 != f3 " << f2.Eval(3.) << " " << f3.Eval(3.) << std::endl; -+ ok &= ret; - - //cms test - TF1 t1("t1","(x<190)?(-18.7813+(((2.49368+(10.3321/(x^0.881126)))*exp(-((x^-1.66603)/0.074916)))-(-17.5757*exp(-((x^-1464.26)/-7.94004e+06))))):(1.09984+(0.394544*exp(-(x/562.407))))"); - double x = 2; - double y =(x<190)?(-18.7813+(((2.49368+(10.3321/(std::pow(x,0.881126))))*exp(-((std::pow(x,-1.66603))/0.074916)))-(-17.5757*exp(-((std::pow(x,-1464.26))/-7.94004e+06))))):(1.09984+(0.394544*exp(-(x/562.407)))); - // this fails on 32 bits - put a tolerance -- ret = TMath::AreEqualAbs(t1.Eval(2) , y , 1.E-8); -- if (!ret) std::cout << "Error in test25 - t1 != y " << t1.Eval(2.) << " " << y << std::endl; -- ok &= ret; -+ ret = fpEqual(t1.Eval(2), y, 1.E-8); -+ if (!ret) std::cout << "Error in test25 - t1 != y " << t1.Eval(2.) << " " << y << std::endl; -+ ok &= ret; - - // tests with scientific notations - auto ff = new TFormula("ff","x+2.e-2^1.2e-1"); -- ret = ( ff->Eval(1.) == (1. + std::pow(2.e-2,1.2e-1) ) ); -- if (!ret) std::cout << "Error in test25 - ff != expr " << ff->Eval(1.) << " " << (1. + std::pow(2.e-2,1.2e-1) ) << std::endl; -- ok &= ret; -+ ret = (ff->Eval(1.) == (1. + std::pow(2.e-2,1.2e-1))); -+ if (!ret) std::cout << "Error in test25 - ff != expr " << ff->Eval(1.) << " " << (1. + std::pow(2.e-2,1.2e-1)) << std::endl; -+ ok &= ret; - - ff = new TFormula("ff","x^-1.2e1"); -- ret = ( ff->Eval(1.5) == std::pow(1.5,-1.2e1) ) ; -- if (!ret) std::cout << "Error in test25 - ff(1.5) != pow " << ff->Eval(1.5) << " " << std::pow(1.5,-1.2e1) << std::endl; -- ok &= ret; -+ ret = (ff->Eval(1.5) == std::pow(1.5,-1.2e1)); -+ if (!ret) std::cout << "Error in test25 - ff(1.5) != pow " << ff->Eval(1.5) << " " << std::pow(1.5,-1.2e1) << std::endl; -+ ok &= ret; - - ff = new TFormula("ff","1.5e2^x"); -- ret = ( ff->Eval(2) == std::pow(1.5e2,2) ); -- if (!ret) std::cout << "Error in test25 - ff(2) != pow " << ff->Eval(2) << " " << std::pow(1.5e2,2) << std::endl; -- ok &= ret; -+ ret = (ff->Eval(2) == std::pow(1.5e2,2)); -+ if (!ret) std::cout << "Error in test25 - ff(2) != pow " << ff->Eval(2) << " " << std::pow(1.5e2,2) << std::endl; -+ ok &= ret; - - ff = new TFormula("ff","1.5e2^x^-1.1e-2"); -- ret = ( ff->Eval(2.) == std::pow(1.5e2, std::pow(2,-1.1e-2) ) ); -- if (!ret) std::cout << "Error in test25 - ff(2) != pow^pow " << ff->Eval(2.) << " " << std::pow(1.5e2, std::pow(2,-1.1e-2) ) << std::endl; -- ok &= ret; -+ ret = (ff->Eval(2.) == std::pow(1.5e2, std::pow(2,-1.1e-2))); -+ if (!ret) std::cout << "Error in test25 - ff(2) != pow^pow " << ff->Eval(2.) << " " << std::pow(1.5e2, std::pow(2,-1.1e-2)) << std::endl; -+ ok &= ret; - - // test same prelacements - ff = new TFormula("ff","pol10(3)+pol2"); - std::vector p = {1,2,3,4,5,6,7,8,9,10,11,12,13,14}; -- ff->SetParameters(p.data() ); -- double sum = 0; for (auto &a : p) { sum+= a;} -- ret = ( ff->Eval(1.) == sum ); -- if (!ret) std::cout << "Error in test25 - ff(1) != sum " << ff->Eval(1.) << " " << sum << std::endl; -- ok &= ret; -+ ff->SetParameters(p.data()); -+ double sum = 0; for (auto &a : p) { sum+= a;} -+ ret = (ff->Eval(1.) == sum); -+ if (!ret) std::cout << "Error in test25 - ff(1) != sum " << ff->Eval(1.) << " " << sum << std::endl; -+ ok &= ret; - -- return ok; -+ return ok; - } - - bool test26() { - // test sign function -- bool ok = true; -+ bool ok = true; - TF1 f("f","x*sign(1.,x+2.)"); - ok &= (f.Eval(2) == 2); - ok &= (f.Eval(-1) == -1); -@@ -483,104 +470,95 @@ bool test26() { - - bool test27() { - // test ssq function -- bool ok = true; -+ bool ok = true; - TF1 f1("f1","x+sq(x+2)+sq(x+[0])"); - TF1 f2("f2","x+(x+2)^2+(x+[0])^2"); - f1.SetParameter(0,3); f2.SetParameter(0,3); -- ok &= fpEqual(f1.Eval(2) , f2.Eval(2)); -- ok &= fpEqual(f1.Eval(-4) , f2.Eval(-4)); -+ ok &= fpEqual(f1.Eval(2), f2.Eval(2)); -+ ok &= fpEqual(f1.Eval(-4), f2.Eval(-4)); - // test nested expressions and conflict with sqrt - TF1 f3("f3","sqrt(1.+sq(x))"); -- ok &= fpEqual(f3.Eval(2) , sqrt(5) ); -+ ok &= fpEqual(f3.Eval(2), sqrt(5)); - TF1 f4("f4","sq(1.+std::sqrt(x))"); -- ok &= fpEqual(f4.Eval(2) , TMath::Sq(1.+sqrt(2)) ); -+ ok &= fpEqual(f4.Eval(2), TMath::Sq(1.+sqrt(2))); - TF1 f5("f5","sqrt(((TMath::Sign(1,[0])*sq([0]/x))+(sq([1])*(x^([3]-1))))+sq([2]))"); - auto func = [](double *x, double *p){ return TMath::Sqrt(((TMath::Sign(1,p[0])*TMath::Sq(p[0]/x[0]))+(TMath::Sq(p[1])*(TMath::Power(x[0],(p[3]-1)))))+TMath::Sq(p[2])); }; - TF1 f6("f6",func,-10,10,4); - f5.SetParameters(-1,2,3,4); f6.SetParameters(f5.GetParameters()); -- ok &= fpEqual(f5.Eval(2) , f6.Eval(2) ); -+ ok &= fpEqual(f5.Eval(2), f6.Eval(2), 4.e-16); - return ok; - } - - bool test28() { -- bool ok = true; -+ bool ok = true; - // test composition of two functions - TF1 fsin("fsin", "[0]*sin(x)", 0., 10.); -- fsin.SetParNames( "sin"); -- fsin.SetParameter( 0, 2.1); -+ fsin.SetParNames("sin"); -+ fsin.SetParameter(0, 2.1); - -- TF1 fcos("fcos", "[0]*cos(x)", 0., 10.); -- fcos.SetParNames( "cos"); -- fcos.SetParameter( 0, 1.1); -+ TF1 fcos("fcos", "[0]*cos(x)", 0., 10.); -+ fcos.SetParNames("cos"); -+ fcos.SetParameter(0, 1.1); - - TF1 fsincos("fsc", "fsin+fcos"); - - // keep same order in evaluation - TF1 f0("f0",[](double *x, double *p){ return p[1]*sin(x[0]) + p[0]*cos(x[0]);},0.,10.,2); - f0.SetParameters(1.1,2.1); --#ifdef R__B64 -- bool epsilon = false; --#else -- bool epsilon = true; --#endif -- ok &= fpEqual(fsincos.Eval(2) , f0.Eval(2), epsilon); -+ ok &= fpEqual(fsincos.Eval(2), f0.Eval(2), 3e-16); - return ok; -- - } - - bool test29() { -- // test hexadecimal numbers -- bool ok = true; -+ // test hexadecimal numbers -+ bool ok = true; - TF1 f1("f1","x+[0]*0xaf"); - f1.SetParameter(0,2); -- ok &= (f1.Eval(3) == (3.+2*175.) ); -+ ok &= (f1.Eval(3) == (3.+2*175.)); - - TF1 f2("f2","0x64^2+x"); -- ok &= (f2.Eval(1) == 10001 ); -+ ok &= (f2.Eval(1) == 10001); - - TF1 f3("f3","x^0x000c+1"); -- ok &= (f3.Eval(2) == 4097 ); -- -- return ok; -+ ok &= (f3.Eval(2) == 4097); - -+ return ok; - } - - bool test30() { - // handle -- (++ is in linear expressions) -- bool ok = true; -+ bool ok = true; - TF1 f1("f1","x--[0]"); - f1.SetParameter(0,2); -- ok &= (f1.Eval(3) == 5. ); -- -- return ok; -+ ok &= (f1.Eval(3) == 5.); - -+ return ok; - } - - bool test31() { - // test whitespaces in par name and cloning -- bool ok = true; -+ bool ok = true; - TF1 f1("f1","x*[0]"); - f1.SetParameter(0,2); - f1.SetParName(0,"First Param"); - auto f2 = (TF1*) f1.Clone(); -- -- ok &= (f1.Eval(3) == f2->Eval(3) ); -- ok &= (TString(f1.GetParName(0) ) == TString(f2->GetParName(0) ) ); - -- return ok; -+ ok &= (f1.Eval(3) == f2->Eval(3)); -+ ok &= (TString(f1.GetParName(0)) == TString(f2->GetParName(0))); - -+ return ok; - } - --bool test32() { -+bool test32() { - // test polynomial are linear and have right number -- bool ok = true; -- TF1 f1("f1","pol2"); -- ok &= (f1.GetNumber() == 302); -- ok &= (f1.IsLinear() ); -- -- TF1 f2("f2","gaus(0)+pol1(3)"); -- ok &= (f2.GetNumber() == 0); -- ok &= (!f2.IsLinear()); -+ bool ok = true; -+ TF1 f1("f1","pol2"); -+ ok &= (f1.GetNumber() == 302); -+ ok &= (f1.IsLinear()); -+ -+ TF1 f2("f2","gaus(0)+pol1(3)"); -+ ok &= (f2.GetNumber() == 0); -+ ok &= (!f2.IsLinear()); - return ok; - } - -@@ -593,69 +571,69 @@ bool test33() { - f1.SetParameters(1,0,1,1,2,0.); - TF2 f2("f2","xygaus",-10,10,-10,10); - f2.SetParameters(1,0,1,1,2); -- ok &= TMath::AreEqualAbs( f1.Eval(0), f2.Eval(0)/(f2.Integral(-10,10,-20,20) ), 1.E-4 ); -+ ok &= fpEqual(f1.Eval(0), f2.Eval(0)/(f2.Integral(-10,10,-20,20)), 1.E-4); - if (!ok) std::cout << "Error in test33 - " << f1.Eval(0) << " " << f2.Eval(0)/f2.Integral(-10,10,-10,10) << std::endl; -- return ok; -+ return ok; - } - - bool test34() { - // test for bug 8105 -- bool ok = true; -+ bool ok = true; - TF1 f1("f1","(1.- gaus)*[3]",-10,10); -- f1.SetParameters(1,0,1,3); -- ok &= TMath::AreEqualAbs( f1.Eval(1), (1.- TMath::Gaus(1,0,1) )*3., 1.E-10); -- return ok; -- -+ f1.SetParameters(1,0,1,3); -+ ok &= fpEqual(f1.Eval(1), (1.- TMath::Gaus(1,0,1))*3., 1.E-10); -+ return ok; - } --bool test35() { -+ -+bool test35() { - // test for similar pre-defined functions - bool ok = true; - TF1 f1("f1","cheb1(0)+cheb10(2)",-1,1); - std::vector par(13); - par.assign(13,1.); par[1] = 2; par[2] = 3; -- TF1 g1("g1",[](double *x, double *p){ return ROOT::Math::ChebyshevN(1, x[0], p ) + ROOT::Math::ChebyshevN(10,x[0],p+2 ); }, -1, 1, 13); -- f1.SetParameters(par.data()); -- g1.SetParameters(par.data()); -+ TF1 g1("g1",[](double *x, double *p){ return ROOT::Math::ChebyshevN(1, x[0], p) + ROOT::Math::ChebyshevN(10,x[0],p+2); }, -1, 1, 13); -+ f1.SetParameters(par.data()); -+ g1.SetParameters(par.data()); - -- ok &= TMath::AreEqualRel( f1.Eval(2), g1.Eval(2), 1.E-6); -+ ok &= TMath::AreEqualRel(f1.Eval(2), g1.Eval(2), 1.E-6); - if (!ok) std::cout << "Error in test35 - f1 != g1 " << f1.Eval(2) << " " << g1.Eval(2) << std::endl; -- -+ - TF1 f2("f2","cheb10(0)+cheb1(11)",-1,1); -- TF1 g2("g2",[](double *x, double *p){ return ROOT::Math::ChebyshevN(10, x[0], p ) + ROOT::Math::ChebyshevN(1,x[0],p+11 ); }, -1, 1, 13); -- f2.SetParameters(par.data()); -- g2.SetParameters(par.data()); -+ TF1 g2("g2",[](double *x, double *p){ return ROOT::Math::ChebyshevN(10, x[0], p) + ROOT::Math::ChebyshevN(1,x[0],p+11); }, -1, 1, 13); -+ f2.SetParameters(par.data()); -+ g2.SetParameters(par.data()); - -- ok &= TMath::AreEqualRel( f2.Eval(2), g2.Eval(2), 1.E-6); -+ ok &= TMath::AreEqualRel(f2.Eval(2), g2.Eval(2), 1.E-6); - if (!ok) std::cout << "Error in test35 - f2 != g2 " << f2.Eval(2.) << " " << g2.Eval(2.) << std::endl; -- -- return ok; -+ -+ return ok; - } --bool test36() { -+ -+bool test36() { - // test for mixed dim functions - bool ok = true; - TF2 f1("f1","xygaus(0) + gaus(5)"); - f1.SetParameters(1,0,1,1,2,2,-1,1); - auto g1 = [](double x, double y){ return TMath::Gaus(x,0,1)*TMath::Gaus(y,1,2)+2.*TMath::Gaus(x,-1,1); }; -- ok &= TMath::AreEqualAbs( f1.Eval(1,1), g1(1,1), 1.E-10); -+ ok &= fpEqual(f1.Eval(1,1), g1(1,1), 1.E-10); - - TF2 f2("f2","xygaus(0) + gaus[y](5)"); - f2.SetParameters(1,0,1,1,2,2,-1,1); - auto g2 = [](double x, double y){ return TMath::Gaus(x,0,1)*TMath::Gaus(y,1,2)+2.*TMath::Gaus(y,-1,1); }; -- ok &= TMath::AreEqualAbs( f2.Eval(1,1), g2(1,1), 1.E-10); -+ ok &= fpEqual(f2.Eval(1,1), g2(1,1), 1.E-10); - -- -- return ok; -+ return ok; - } - - bool test37() { - // test for inserting correcting polynomials (bug ROOT-8496) - bool ok = true; - TF1 f1("f1","[0]*pol1(1) + pol2(3)*[6]",0,1); -- f1.SetParameters(2,1,2,1,2,3,4); -+ f1.SetParameters(2,1,2,1,2,3,4); - auto ref = [](double x) { return 2 * (1 + 2*x ) + (1 + 2*x + 3*x*x) * 4 ; }; - -- ok &= TMath::AreEqualAbs( f1.Eval(0.5), ref(0.5), 1.E-10); -- return ok; -+ ok &= fpEqual(f1.Eval(0.5), ref(0.5), 1.E-10); -+ return ok; - } - - bool test38() { -@@ -666,81 +644,80 @@ bool test38() { - ok &= (f1.Eval(0) == 2.); - TF1 f2("f2","[A]+[1]*x",0,1); - f2.SetParameters(999,2,3); -- ok &= (f2.Eval(2) == 7.); -- return ok; -+ ok &= (f2.Eval(2) == 7.); -+ return ok; - } -- --void PrintError(int itest) { -+ -+void PrintError(int itest) { - Error("TFormula test","test%d FAILED ",itest); - failedTests.push_back(itest); - } -+ - void IncrTest(int & itest) { - if (itest > 0) std::cout << ".\n"; - itest++; - std::cout << "Test " << itest << " : "; --} -+} - - int runTests(bool debug = false) { - - verbose = debug; -- -+ - int itest = 0; - -- -- IncrTest(itest); if (!test1() ) { PrintError(itest); } -- IncrTest(itest); if (!test2() ) { PrintError(itest); } -- IncrTest(itest); if (!test3() ) { PrintError(itest); } -- IncrTest(itest); if (!test4() ) { PrintError(itest); } -- IncrTest(itest); if (!test5() ) { PrintError(itest); } -- IncrTest(itest); if (!test6() ) { PrintError(itest); } -- IncrTest(itest); if (!test7() ) { PrintError(itest); } -- IncrTest(itest); if (!test8() ) { PrintError(itest); } -- IncrTest(itest); if (!test9() ) { PrintError(itest); } -- IncrTest(itest); if (!test10() ) { PrintError(itest); } -- IncrTest(itest); if (!test11() ) { PrintError(itest); } -- IncrTest(itest); if (!test12() ) { PrintError(itest); } -- IncrTest(itest); if (!test13() ) { PrintError(itest); } -- IncrTest(itest); if (!test14() ) { PrintError(itest); } -- IncrTest(itest); if (!test15() ) { PrintError(itest); } -- IncrTest(itest); if (!test16() ) { PrintError(itest); } -- IncrTest(itest); if (!test17() ) { PrintError(itest); } -- IncrTest(itest); if (!test18() ) { PrintError(itest); } -- IncrTest(itest); if (!test19() ) { PrintError(itest); } -- IncrTest(itest); if (!test20() ) { PrintError(itest); } -- IncrTest(itest); if (!test21() ) { PrintError(itest); } -- IncrTest(itest); if (!test22() ) { PrintError(itest); } -- IncrTest(itest); if (!test23() ) { PrintError(itest); } -- IncrTest(itest); if (!test24() ) { PrintError(itest); } -- IncrTest(itest); if (!test25() ) { PrintError(itest); } -- IncrTest(itest); if (!test26() ) { PrintError(itest); } -- IncrTest(itest); if (!test27() ) { PrintError(itest); } -- IncrTest(itest); if (!test28() ) { PrintError(itest); } -- IncrTest(itest); if (!test29() ) { PrintError(itest); } -- IncrTest(itest); if (!test30() ) { PrintError(itest); } -- IncrTest(itest); if (!test31() ) { PrintError(itest); } -- IncrTest(itest); if (!test32() ) { PrintError(itest); } -- IncrTest(itest); if (!test33() ) { PrintError(itest); } -- IncrTest(itest); if (!test34() ) { PrintError(itest); } -- IncrTest(itest); if (!test35() ) { PrintError(itest); } -- IncrTest(itest); if (!test36() ) { PrintError(itest); } -- IncrTest(itest); if (!test37() ) { PrintError(itest); } -- IncrTest(itest); if (!test38() ) { PrintError(itest); } -+ IncrTest(itest); if (!test1()) { PrintError(itest); } -+ IncrTest(itest); if (!test2()) { PrintError(itest); } -+ IncrTest(itest); if (!test3()) { PrintError(itest); } -+ IncrTest(itest); if (!test4()) { PrintError(itest); } -+ IncrTest(itest); if (!test5()) { PrintError(itest); } -+ IncrTest(itest); if (!test6()) { PrintError(itest); } -+ IncrTest(itest); if (!test7()) { PrintError(itest); } -+ IncrTest(itest); if (!test8()) { PrintError(itest); } -+ IncrTest(itest); if (!test9()) { PrintError(itest); } -+ IncrTest(itest); if (!test10()) { PrintError(itest); } -+ IncrTest(itest); if (!test11()) { PrintError(itest); } -+ IncrTest(itest); if (!test12()) { PrintError(itest); } -+ IncrTest(itest); if (!test13()) { PrintError(itest); } -+ IncrTest(itest); if (!test14()) { PrintError(itest); } -+ IncrTest(itest); if (!test15()) { PrintError(itest); } -+ IncrTest(itest); if (!test16()) { PrintError(itest); } -+ IncrTest(itest); if (!test17()) { PrintError(itest); } -+ IncrTest(itest); if (!test18()) { PrintError(itest); } -+ IncrTest(itest); if (!test19()) { PrintError(itest); } -+ IncrTest(itest); if (!test20()) { PrintError(itest); } -+ IncrTest(itest); if (!test21()) { PrintError(itest); } -+ IncrTest(itest); if (!test22()) { PrintError(itest); } -+ IncrTest(itest); if (!test23()) { PrintError(itest); } -+ IncrTest(itest); if (!test24()) { PrintError(itest); } -+ IncrTest(itest); if (!test25()) { PrintError(itest); } -+ IncrTest(itest); if (!test26()) { PrintError(itest); } -+ IncrTest(itest); if (!test27()) { PrintError(itest); } -+ IncrTest(itest); if (!test28()) { PrintError(itest); } -+ IncrTest(itest); if (!test29()) { PrintError(itest); } -+ IncrTest(itest); if (!test30()) { PrintError(itest); } -+ IncrTest(itest); if (!test31()) { PrintError(itest); } -+ IncrTest(itest); if (!test32()) { PrintError(itest); } -+ IncrTest(itest); if (!test33()) { PrintError(itest); } -+ IncrTest(itest); if (!test34()) { PrintError(itest); } -+ IncrTest(itest); if (!test35()) { PrintError(itest); } -+ IncrTest(itest); if (!test36()) { PrintError(itest); } -+ IncrTest(itest); if (!test37()) { PrintError(itest); } -+ IncrTest(itest); if (!test38()) { PrintError(itest); } - - std::cout << ".\n"; -- -- if (failedTests.size() == 0) -+ -+ if (failedTests.size() == 0) - std::cout << "All TFormula Parsing tests PASSED !" << std::endl; - else { -- Error("TFORMULA Tests","%d tests failed ",int(failedTests.size()) ); -+ Error("TFORMULA Tests","%d tests failed ",int(failedTests.size())); - std::cout << "failed tests are : "; -- for (auto & ittest : failedTests) { -+ for (auto & ittest : failedTests) { - std::cout << ittest << " "; - } - std::cout << std::endl; - } -- -- return failedTests.size(); -- -+ -+ return failedTests.size(); - } - - }; diff --git a/root.spec b/root.spec index 0fd4a8d..acbfd13 100644 --- a/root.spec +++ b/root.spec @@ -21,9 +21,9 @@ %global _default_patch_flags --no-backup-if-mismatch Name: root -Version: 6.08.04 +Version: 6.08.06 %global libversion %(cut -d. -f 1-2 <<< %{version}) -Release: 3%{?dist} +Release: 1%{?dist} Summary: Numerical data analysis framework License: LGPLv2+ @@ -42,7 +42,7 @@ Source2: %{name}-testfiles.sh Source3: rootd.service Source4: proofd.service # Allow running tests -# https://github.com/root-mirror/root/pull/130 +# https://github.com/root-project/root/pull/130 Patch0: %{name}-test-install.patch # Use system fonts Patch1: %{name}-fontconfig.patch @@ -52,63 +52,58 @@ Patch2: %{name}-dont-link-jvm.patch Patch3: %{name}-doc-no-notebooks.patch # Don't run gui macros Patch4: %{name}-avoid-gui-crash.patch - -# Test fixes -# https://github.com/root-mirror/root/pull/155 - # Use files in source tree during tests +# https://github.com/root-project/root/pull/403 Patch5: %{name}-template-files.patch # Use cache read option +# https://github.com/root-project/root/pull/404 Patch6: %{name}-cache-test.patch # Fixes for tests on ix86 +# https://github.com/root-project/root/pull/400 +# https://github.com/root-project/root/pull/401 Patch7: %{name}-32bit.patch -# Clean up TFormulaParsingTests -Patch8: %{name}-tformulaparsingtests.patch +# Fix root-config for s390/s390x +# https://github.com/root-project/root/pull/406 +Patch8: %{name}-s390x.patch # Typo in TFormulaTests +# https://github.com/root-project/root/pull/405 Patch9: %{name}-tformulatests-typo.patch # Don't download testdata +# https://github.com/root-project/root/pull/402 Patch10: %{name}-no-testdata.patch - -# Miscellaneous - # Missing includes -# https://github.com/root-mirror/root/pull/269 +# https://github.com/root-project/root/pull/269 Patch11: %{name}-missing-includes.patch # Old FSF address -# https://github.com/root-mirror/root/pull/270 +# https://github.com/root-project/root/pull/270 Patch12: %{name}-fsf-addr.patch # Name clash HZ -# https://github.com/root-mirror/root/pull/309 +# https://github.com/root-project/root/pull/309 Patch13: %{name}-hz.patch # Fix errors when building documentation -# https://github.com/root-mirror/root/pull/310 +# https://github.com/root-project/root/pull/310 Patch14: %{name}-global-name-not-defined.patch # Fix paths in image tutorial -# https://github.com/root-mirror/root/pull/311 +# https://github.com/root-project/root/pull/311 Patch15: %{name}-rose-image.patch # Fix stressGraphics.ref -# https://github.com/root-mirror/root/pull/312 +# https://github.com/root-project/root/pull/312 Patch16: %{name}-stressgraphics.patch # Fix broken TPad::WaitPrimitive (backport from git) Patch17: %{name}-TPad-WaitPrimitive.patch -# Don't wait for user interaction in batch mode -# https://github.com/root-mirror/root/pull/322 -Patch18: %{name}-spectrum-batch.patch -# Add missing header (gcc 7) -# https://github.com/root-mirror/root/pull/353 -Patch19: %{name}-missing-header-gcc7.patch # Fix for test suite on Fedora 26 i686 -# https://github.com/root-mirror/root/pull/359 -Patch20: %{name}-Quantiles.patch +# https://github.com/root-project/root/pull/359 +Patch18: %{name}-Quantiles.patch # Fix format warnings/errors -# https://github.com/root-mirror/root/pull/376 -Patch21: %{name}-format.patch +# https://github.com/root-project/root/pull/376 +Patch19: %{name}-format.patch # Allow both absolute and relative python install paths -# https://github.com/root-mirror/root/pull/382 -Patch22: %{name}-python-install-path.patch +# https://github.com/root-project/root/pull/382 +Patch20: %{name}-python-install-path.patch # The build on aarch64 used to work, but is now broken again # https://pagure.io/releng/issue/6653 +# https://sft.its.cern.ch/jira/browse/ROOT-8702 ExcludeArch: aarch64 # s390 is not supported by cling: "error: unknown target # triple 's390-ibm-linux', please use -triple or -arch" @@ -1583,8 +1578,6 @@ ROOT as a Jupyter Notebook. %patch18 -p1 %patch19 -p1 %patch20 -p1 -%patch21 -p1 -%patch22 -p1 # Remove bundled sources in order to be sure they are not used # * afterimage @@ -2093,18 +2086,35 @@ popd # - tutorial-multicore-imt101_parTreeProcessing # requires input data: http://root.cern.ch/files/tp_process_imt.root (707 MB) # -# - tutorial-r-* -# occasionally causes random crashes -# # - test-stressiterators-interpreted # - tutorial-hist-sparsehist # - test-stressHistFactory-interpreted # - tutorial-histfactory-example +# - tutorial-r-* # currently fails on 32 bit arm - reported upstream: # https://sft.its.cern.ch/jira/browse/ROOT-8500 -excluded="test-stressIOPlugins-.*|tutorial-tree-run_h1analysis|tutorial-multicore-imt001_parBranchProcessing|tutorial-multicore-mp103_processSelector|tutorial-multicore-imt101_parTreeProcessing|tutorial-r-.*" +# +# - test-stresshistogram +# - test-stresshistogram-interpreted +# - test-stressroostats +# - test-stressroostats-interpreted +# - test-stresshistofit +# - test-stresshistofit-interpreted +# - tutorial-roofit-rf511_wsfactory_basic +# - tutorial-roostats-HybridInstructional +# - tutorial-roostats-rs701_BayesianCalculator +# - tutorial-pyroot-benchmarks +# - tutorial-pyroot-ratioplot +# - tutorial-pyroot-shapes +# currently fails on s390x - reported upstream +# https://sft.its.cern.ch/jira/browse/ROOT-8703 + +excluded="test-stressIOPlugins-.*|tutorial-tree-run_h1analysis|tutorial-multicore-imt001_parBranchProcessing|tutorial-multicore-mp103_processSelector|tutorial-multicore-imt101_parTreeProcessing" %ifarch %{arm} -excluded="${excluded}|test-stressiterators-interpreted|tutorial-hist-sparsehist|test-stressHistFactory-interpreted|tutorial-histfactory-example" +excluded="${excluded}|test-stressiterators-interpreted|tutorial-hist-sparsehist|test-stressHistFactory-interpreted|tutorial-histfactory-example|tutorial-r-.*" +%endif +%ifarch s390x +excluded="${excluded}|test-stresshistogram|test-stressroostats|test-stresshistofit|tutorial-roofit-rf511_wsfactory_basic|tutorial-roostats-HybridInstructional|tutorial-roostats-rs701_BayesianCalculator|tutorial-pyroot-benchmarks|tutorial-pyroot-ratioplot|tutorial-pyroot-shapes" %endif make test ARGS="%{?_smp_mflags} --output-on-failure -E \"${excluded}\"" popd @@ -3126,6 +3136,13 @@ fi %{_datadir}/%{name}/notebook %changelog +* Thu Mar 02 2017 Mattias Ellert - 6.08.06-1 +- Update to 6.08.06 +- Drop obsolete patch: root-tformulaparsingtests.patch +- Drop patches accepted upstream: root-spectrum-batch.patch and + root-missing-header-gcc7.patch +- Disable failing tests on s390x + * Wed Mar 01 2017 Mattias Ellert - 6.08.04-3 - Disable building on aarch64 (it is now broken again) - Add missing header (gcc 7) diff --git a/sources b/sources index 8e66c44..2144ec1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (root-6.08.04.tar.xz) = db3480e6de919cf09ac32b9e3ce9901a0772313024786f053786b3df400a660683aca65e4d91c7f76d8c62ebf4a36deda6d556df1196d76277ccb060445531ce +SHA512 (root-6.08.06.tar.xz) = f9604055bee65b9dba69ad64f69749f6cfd8e7b84b487a0552f5a54806447f97f3372c35610f43045bd9ef3304be87095c6a595bc5b0985d6822d8cf6c22c8b1 SHA512 (root-testfiles.tar.xz) = 1a1295693b80aa27546bd9cf4a34cb38df1a3be2b14a3a29f418cd49058ae5d581e03e2e7fb9e978d448b29cf407e0f0bb4a5c26211e519d506166ec0b78e86b