Skip to content

Commit eb83c9e

Browse files
utkarshayachitkwrobot
authored andcommitted
Merge topic 'no-tmp-dirs'
dd55d7c data_exploration: fix a typo 996611a cmake: use a dummy prefix rather than a real path 4587736 vtkResampledAMRImageSource: remove debug code a855e08 testing: avoid /tmp directories
2 parents a53aaca + dd55d7c commit eb83c9e

File tree

8 files changed

+26
-16
lines changed

8 files changed

+26
-16
lines changed

Applications/ParaView/Testing/Python/TestPythonParaViewWebMPI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def initialize(self):
7272
webArguments = pv_ipython.WebArguments('%s/www' % build_path)
7373

7474
def start():
75-
paraviewHelper.Initialize('/tmp/mpi-python')
75+
paraviewHelper.Initialize(os.path.join(os.getcwd(), 'Testing', 'Temporary', 'mpi-python'))
7676
paraviewHelper.SetWebProtocol(TestProtocol, webArguments)
7777
return paraviewHelper.Start()
7878

@@ -90,4 +90,4 @@ def start_thread():
9090
# Main
9191
#------------------------------------------------------------------------------
9292
if __name__ == "__main__":
93-
start_thread()
93+
start_thread()

Applications/ParaView/Testing/Python/TestPythonParaViewWebiPythonMPI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
sphere = None
3636

3737
def start():
38-
paraviewHelper.Initialize('/tmp/mpi-python')
38+
paraviewHelper.Initialize(os.path.join(os.getcwd(), 'Testing', 'Temporary', 'mpi-python'))
3939
pv_ipython.IPythonProtocol.updateArguments(webArguments)
4040
paraviewHelper.SetWebProtocol(pv_ipython.IPythonProtocol, webArguments)
4141
return paraviewHelper.Start()
@@ -69,4 +69,4 @@ def start_thread():
6969
# Main
7070
#------------------------------------------------------------------------------
7171
if __name__ == "__main__":
72-
start_thread()
72+
start_thread()
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
paraview_add_test_cxx(${vtk-module}CxxTests tests
22
NO_DATA NO_OUTPUT NO_VALID
3-
TestParaViewPipelineController.cxx
43
TestSessionProxyManager.cxx
54
TestSettings.cxx
65
)
6+
paraview_add_test_cxx(${vtk-module}CxxTests tmp_tests
7+
NO_DATA NO_VALID
8+
TestParaViewPipelineController.cxx
9+
)
10+
list(APPEND tests
11+
${tmp_tests})
712
vtk_test_cxx_executable(${vtk-module}CxxTests tests)

ParaViewCore/ServerManager/Core/Testing/Cxx/TestParaViewPipelineController.cxx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PURPOSE. See the above copyright notice for more information.
2222
#include "vtkSMSessionProxyManager.h"
2323
#include "vtkSmartPointer.h"
2424
#include "vtkSMViewProxy.h"
25+
#include "vtkTestUtilities.h"
2526

2627
#include <vtksys/ios/sstream>
2728
#include <assert.h>
@@ -96,7 +97,17 @@ int TestParaViewPipelineController(int argc, char* argv[])
9697
view->UpdateVTKObjects();
9798
}
9899

99-
pxm->SaveXMLState("/tmp/state.pvsm");
100+
char *tempDir = vtkTestUtilities::GetArgOrEnvOrDefault(
101+
"-T", argc, argv, "VTK_TEMP_DIR", "Testing/Temporary");
102+
if (!tempDir)
103+
{
104+
cerr << "Could not determine temporary directory.\n";
105+
return EXIT_FAILURE;
106+
}
107+
std::string path = tempDir;
108+
path += "/state.pvsm";
109+
pxm->SaveXMLState(path.c_str());
110+
delete [] tempDir;
100111
session->Delete();
101112
vtkInitializationHelper::Finalize();
102113
return EXIT_SUCCESS;

ParaViewCore/VTKExtensions/Rendering/vtkResampledAMRImageSource.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "vtkUniformGridAMRDataIterator.h"
3030
#include "vtkUniformGrid.h"
3131
#include "vtkVoxel.h"
32-
#include "vtkXMLImageDataWriter.h"
3332

3433
#include <algorithm>
3534
#include <assert.h>
@@ -119,11 +118,6 @@ void vtkResampledAMRImageSource::UpdateResampledVolume(
119118
this->ResampledAMRPointData->GetAbstractArray(cc)->Modified();
120119
}
121120
}
122-
123-
//vtkNew<vtkXMLImageDataWriter> tmp;
124-
//tmp->SetFileName("/tmp/foo.vti");
125-
//tmp->SetInputData(this->ResampledAMR);
126-
//tmp->Update();
127121
}
128122

129123
//----------------------------------------------------------------------------

Utilities/ColorSeriesToXML/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if (NOT CMAKE_CROSSCOMPILING)
4343
if (UNIX)
4444
# setup install rpath correctly so that vtkColorSeriesToXML can file needed libraries
4545
# at runtime.
46-
set (_temp_prefix "/tmp")
46+
set (_temp_prefix "/example-prefix")
4747
set (_bin "${_temp_prefix}/${VTK_INSTALL_RUNTIME_DIR}")
4848
set (_so "${_temp_prefix}/${VTK_INSTALL_LIBRARY_DIR}")
4949
file (RELATIVE_PATH relative_path "${_bin}" "${_so}")

Utilities/ProcessXML/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (NOT CMAKE_CROSSCOMPILING)
3939
if (UNIX)
4040
# setup install rpath correctly so that kwProcessXML can file needed libraries
4141
# at runtime.
42-
set (_temp_prefix "/tmp")
42+
set (_temp_prefix "/example-prefix")
4343
set (_bin "${_temp_prefix}/${VTK_INSTALL_RUNTIME_DIR}")
4444
set (_so "${_temp_prefix}/${VTK_INSTALL_LIBRARY_DIR}")
4545
file (RELATIVE_PATH relative_path "${_bin}" "${_so}")

Wrapping/Python/paraview/data_exploration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ def test3(basePath):
14261426
prober = DataProber( FileNameGenerator(os.path.join(basePath, 'dataprober'), 'data_{time}_{field}_{serie}.csv'), w, points_series, [ "RTData" ])
14271427
prober.UpdatePipeline(0.0)
14281428

1429-
timeProber = TimeSerieDataProber( FileNameGenerator(os.path.join(os.getcwd(), 'Testing/Temporary/dataprober_time'), 'data_{field}.csv'), w, time_series, [ "RTData"], 100)
1429+
timeProber = TimeSerieDataProber( FileNameGenerator(os.path.join(os.getcwd(), 'Testing', 'Temporary', 'dataprober_time'), 'data_{field}.csv'), w, time_series, [ "RTData"], 100)
14301430
for time in range(101):
14311431
timeProber.UpdatePipeline(time)
14321432

@@ -1572,7 +1572,7 @@ def testDynamicLighting():
15721572

15731573
title = "Composite Dynamic Rendering Test"
15741574
description = "A sample file for dynamic rendering"
1575-
analysis = AnalysisManager( '/tmp/wavelet', title, description)
1575+
analysis = AnalysisManager( os.path.join(os.getcwd(), 'Testing', 'Temporary', 'wavelet1'), title, description)
15761576

15771577
id = 'composite'
15781578
title = '3D composite'

0 commit comments

Comments
 (0)