Bläddra i källkod

corrige gestion erreur cleanapp

olivier.massot 9 år sedan
förälder
incheckning
72a0a4e24f

BIN
OpenAccess.zip


+ 33 - 33
source/forms/OpenAccess.bas

@@ -21,10 +21,10 @@ Begin Form
     Width =6645
     DatasheetFontHeight =11
     ItemSuffix =43
-    Left =-16140
-    Top =-1425
-    Right =-6840
-    Bottom =10920
+    Left =-22140
+    Top =2415
+    Right =-255
+    Bottom =15150
     DatasheetGridlinesColor =14806254
     RecSrcDt = Begin
         0xeb366d1c54d7e440
@@ -1011,33 +1011,33 @@ Option Compare Database
 Dim RUNNING_OP As Boolean
 
 Private Sub cmd_export_Click()
-Dim optimizer, zip As Boolean
-optimizer = Me.chk_optimizer
-zip = Me.chk_zip
-
-If Me.chk_debug_mode Then
-    OA_Log.set_debug_mode
-End If
-
-RUNNING_OP = True
-
-' update log path
-logger "cmd_export_Click", "INFO", "Run Export"
-Me.lbl_log_path.Caption = OA_Log.log_file
-
-' update state
-Call update_state
-
-' start export
-Dim result As Variant
-result = make_sources(optimizer, zip)
-
-' update state
-RUNNING_OP = False
-Call update_state
-
-'display result
-Call display_status(result)
+    Dim optimizer, zip As Boolean
+    optimizer = Me.chk_optimizer
+    zip = Me.chk_zip
+    
+    If Me.chk_debug_mode Then
+        OA_Log.set_debug_mode
+    End If
+    
+    RUNNING_OP = True
+    
+    ' update log path
+    logger "cmd_export_Click", "INFO", "Run Export"
+    Me.lbl_log_path.Caption = OA_Log.log_file
+    
+    ' update state
+    Call update_state
+    
+    ' start export
+    Dim result As Variant
+    result = make_sources(optimizer, zip)
+    
+    ' update state
+    RUNNING_OP = False
+    Call update_state
+    
+    'display result
+    Call display_status(result)
 
 End Sub
 
@@ -1111,11 +1111,11 @@ Private Sub display_status(result As Variant)
             GoTo err
     End Select
     
-    MsgBox msg, vbInformation, "Open Access"
+    OA_MsgBox msg, vbInformation, "Open Access"
     
     Exit Sub
 err:
-    MsgBox msg & "> (unable to read the returned status)", vbExclamation, "Open Access"
+    OA_MsgBox msg & "> (unable to read the returned status)", vbExclamation, "Open Access"
 End Sub
 
 Private Sub update_state()

+ 49 - 11
source/modules/OA_Main.bas

@@ -31,7 +31,7 @@ Dim step As String
     End If
     
     'Save is needed to correctly list objects to export
-    CurrentProject.Application.RunCommand acCmdSave
+    SaveProject
 
     If Not prompt_for_export_confirmation Then
         GoTo cancelOp
@@ -54,13 +54,23 @@ Dim step As String
     logger "make_sources", "INFO", step
     Call update_sources_date
 
+    ' cleans the obsolete files (see CleanDirs in optimizer)
+    msg = CleanDirs(True)
+    If Len(msg) > 0 Then
+        msg = "Following objects do not exist anymore, do you want to delete treir source files?" & vbNewLine & _
+          "" & msg
+        If OA_MsgBox(msg, vbYesNo, "Cleaning") = vbYes Then
+            Call CleanDirs
+        End If
+    End If
+
     make_sources = opCompleted
     Exit Function
     
 err:
-    MsgBox "Unknown error - " & err.Description & " (#" & err.number & ")" & vbNewLine & "See the log file for more information", vbCritical, "CRITICAL ERROR"
-    If err.number <> "60000" Then
-        logger "make_sources", "ERROR", "Unknown error at: " & step & " - " & err.Description & "(#" & err.number & ")"
+    OA_MsgBox "Unknown error - " & err.Description & " (#" & err.Number & ")" & vbNewLine & "See the log file for more information", vbCritical, "CRITICAL ERROR"
+    If err.Number <> "60000" Then
+        logger "make_sources", "ERROR", "Unknown error at: " & step & " - " & err.Description & "(#" & err.Number & ")"
     End If
     
     Call update_oa_param("sources_date", CStr(old_sources_date))
@@ -87,7 +97,7 @@ Public Function update_from_sources(Optional ByVal backup As Boolean) As Integer
     
         If Not backup_ok Then
             logger "update_from_sources", "ERROR", "Error: unable to backup the app file, do it manually, then click OK"
-            MsgBox "Error: unable to backup the app file, do it manually, then click OK", vbExclamation, "Backup"
+            OA_MsgBox "Error: unable to backup the app file, do it manually, then click OK", vbExclamation, "Backup"
         End If
     End If
 
@@ -106,7 +116,7 @@ Public Function update_from_sources(Optional ByVal backup As Boolean) As Integer
     If Len(msg) > 0 Then
         msg = "Following objects do not exist in the sources, do you want to delete them?" & vbNewLine & _
           "" & msg
-        If MsgBox(msg, vbYesNo, "Cleaning") = vbYes Then
+        If OA_MsgBox(msg, vbYesNo, "Cleaning") = vbYes Then
             Call CleanApp
         End If
     End If
@@ -119,9 +129,9 @@ Public Function update_from_sources(Optional ByVal backup As Boolean) As Integer
     update_from_sources = opCompleted
     Exit Function
 err:
-    MsgBox "Unknown error - " & err.Description & " (#" & err.number & ")" & vbNewLine & "See the log file for more information", vbCritical, "CRITICAL ERROR"
-    If err.number <> "60000" Then
-        logger "update_from_sources", "CRITICAL", "Unknown error at: " & step & " - " & err.Description & "(#" & err.number & ")"
+    OA_MsgBox "Unknown error - " & err.Description & " (#" & err.Number & ")" & vbNewLine & "See the log file for more information", vbCritical, "CRITICAL ERROR"
+    If err.Number <> "60000" Then
+        logger "update_from_sources", "CRITICAL", "Unknown error at: " & step & " - " & err.Description & "(#" & err.Number & ")"
     End If
     
     Exit Function
@@ -161,7 +171,7 @@ end_:
     Exit Function
 UnknownErr:
     logger "zip_app_file", "ERROR", "Unable to zip " & CurrentProject.Path & "\" & CurrentProject.name & " - " & err.Description
-    MsgBox "Unknown error: unable to ZIP the app file, do it manually"
+    OA_MsgBox "Unknown error: unable to ZIP the app file, do it manually"
     GoTo end_
 End Function
 
@@ -182,5 +192,33 @@ Public Function make_backup() As Boolean
     Exit Function
 err:
     logger "make_backup", "ERROR", "Error during the backup of " & CurrentProject.name & ": " & err.Description
-    MsgBox "Error during the backup of " & CurrentProject.name & ": " & err.Description & vbNewLine & "Do it manually"
+    OA_MsgBox "Error during the backup of " & CurrentProject.name & ": " & err.Description & vbNewLine & "Do it manually"
+End Function
+
+
+Public Function silent_export()
+    'used for tests
+    
+    OA_Msg.activate_SilentMode
+    OA_Log.set_debug_mode
+
+    Dim result As Variant
+    result = make_sources(optimizer:=False, zip:=True)
+
+    logger "silent_export", "INFO", "make_sources returned " & result
+
+End Function
+
+Public Function silent_import()
+    'used for tests
+    
+    OA_Msg.activate_SilentMode
+    OA_Log.set_debug_mode
+    
+    Dim result As Variant
+    result = update_from_sources(backup:=True)
+
+    logger "silent_export", "INFO", "update_from_sources returned " & result
+    
+
 End Function

+ 48 - 2
source/modules/OA_Msg.bas

@@ -1,4 +1,50 @@
 Option Compare Database
+Dim p_SilentMode As Boolean
+
+Public Sub activate_SilentMode()
+    p_SilentMode = True
+End Sub
+
+Public Function SilentMode_activated() As Boolean
+    SilentMode_activated = p_SilentMode
+End Function
+
+Public Function OA_MsgBox(ByVal msg As String, Optional ByVal buttons As Long, Optional title As String) As Integer
+
+    If Not p_SilentMode Then
+    
+        OA_MsgBox = MsgBox(msg, buttons, title)
+    
+    Else
+    
+        logger "OA_MsgBox", "INFO", title & " - " & msg
+        
+        While buttons >= 16
+            buttons = buttons - 16
+        Wend
+        
+        Select Case buttons
+            Case vbOKOnly
+                OA_MsgBox = vbOK
+            Case vbOKCancel
+                OA_MsgBox = vbOK
+            Case vbAbortRetryIgnore
+                OA_MsgBox = vbIgnore
+            Case vbYesNoCancel
+                OA_MsgBox = vbYes
+            Case vbYesNo
+                OA_MsgBox = vbYes
+            Case vbRetryCancel
+                OA_MsgBox = vbCancel
+        End Select
+        
+        logger "OA_MsgBox", "DEBUG", "Silent mode: OA_Msgbox returned " & OA_MsgBox
+    End If
+
+End Function
+
+
+
 
 Public Function prompt_for_export_confirmation() As Boolean
 
@@ -7,7 +53,7 @@ Public Function prompt_for_export_confirmation() As Boolean
           msg_list_to_export() & _
           ""
           
-    prompt_for_export_confirmation = (MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK)
+    prompt_for_export_confirmation = (OA_MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK)
     
 End Function
 
@@ -17,6 +63,6 @@ Public Function prompt_for_import_confirmation() As Boolean
     msg = "****   OPENACCESS IMPORT   ****" & vbNewLine & _
           "You're going to update " & UCase(CurrentProject.name) & " with the sources files" & vbNewLine & vbNewLine & _
           "WARNING: Any non exported work would be lost!"
-    prompt_for_import_confirmation = (MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK)
+    prompt_for_import_confirmation = (OA_MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK)
     
 End Function

+ 16 - 5
source/modules/OA_Optimizer.bas

@@ -92,6 +92,7 @@ Public Function list_to_export(acType As Integer)
     
     Do Until rs.EOF
         If Left$(rs![name], 4) <> "MSys" And _
+            Not rs![name] Like "f_*_data" And _
             Left$(rs![name], 1) <> "~" Then
             
             If get_last_update_date(acType, rs![name]) > sources_date Or _
@@ -261,6 +262,12 @@ Public Function CleanDirs(Optional ByVal sim As Boolean = False)
         For Each file In oFld.Files
             objectname = remove_ext(file.name)
             objectname = to_accessname(objectname)
+            
+            If InStr("[34]", objectname) > 0 Then
+                logger "CleanDirs", "DEBUG", "> " & short_path & " ignored because of [64] (double quotes)"
+                GoTo next_file
+            End If
+            
             rsSys.FindFirst (msys_type_filter(obj_type_num) & " AND [name]=" & Chr(34) & objectname & Chr(34) & "")
             
             If rsSys.NoMatch Then
@@ -274,7 +281,7 @@ Public Function CleanDirs(Optional ByVal sim As Boolean = False)
                     logger "CleanDirs", "DEBUG", "> removed: " & short_path
                 End If
             End If
-            
+next_file:
         Next file
         
         
@@ -327,6 +334,7 @@ Public Function CleanApp(Optional ByVal sim As Boolean = False) As String
 ' cleans the directories after a differential export
 ' returns a list of the deleted relative file paths (string with '|' separator)
 ' if 'sim' is set to True, doesn't process to the delete but still return the list
+    On Error GoTo err
     Dim subdir, filename, objectname, dirname, short_path As String
     Dim obj_type, obj_type_split As Variant
     Dim obj_type_num As Integer
@@ -368,7 +376,6 @@ Public Function CleanApp(Optional ByVal sim As Boolean = False) As String
         End Select
         
         If Not files_exist_for(acType, rsSys![name]) Then
-            
             If sim = False Then
                 logger "CleanApp", "DEBUG", "> remove: " & rsSys![name] & " (" & acType & ")"
                 DoCmd.DeleteObject acType, rsSys![name]
@@ -379,15 +386,19 @@ Public Function CleanApp(Optional ByVal sim As Boolean = False) As String
     
         End If
 next_record:
-        If err.number > 0 Then
+        If err.Number > 0 Then
             logger "CleanApp", "ERROR", "Unable to delete " & rsSys![name] & " (" & acType & "): " & err.Description
             err.Clear
+            On Error GoTo next_record
         End If
         rsSys.MoveNext
         
     Loop
-        
-
+    
+    On Error GoTo err
     logger "CleanApp", "INFO", "> Cleaned: " & CleanApp
 
+Exit Function
+err:
+    logger "CleanApp", "ERROR", err.Description
 End Function

+ 1 - 1
source/modules/OA_Properties.bas

@@ -105,7 +105,7 @@ Sub SetOrCreateProperty(ByRef daoObject As Object, ByVal prp_name As String, ByV
         
     Exit Sub
 err:
-    Select Case err.number
+    Select Case err.Number
         Case 3270
             ' property not found
             Call CreateProperty(daoObject, prp_name, prp_value, prp_type)

+ 9 - 4
source/modules/OA_Utils.bas

@@ -6,10 +6,10 @@ On Error GoTo err
     oa_tbl_exists = (CurrentDb.TableDefs("USysOpenAccess").name = "USysOpenAccess")
 Exit Function
 err:
-    If err.number = 3265 Then
+    If err.Number = 3265 Then
         oa_tbl_exists = False
     Else
-        MsgBox "Error: " & err.Description, vbCritical
+        OA_MsgBox "Error: " & err.Description, vbCritical
     End If
 End Function
 
@@ -95,7 +95,7 @@ Public Function msys_type_filter(acType) As String
 
 Exit Function
 typerror:
-    MsgBox "typerror:" & acType & " is not a valid object type"
+    OA_MsgBox "typerror:" & acType & " is not a valid object type"
     msys_type_filter = ""
 End Function
 
@@ -168,4 +168,9 @@ Public Function complete_gitignore()
     Set FSO = Nothing
     Set oFile = Nothing
 
-End Function
+End Function
+
+Public Sub SaveProject()
+On Error Resume Next
+    CurrentProject.Application.RunCommand acCmdSave
+End Sub

+ 2 - 2
source/modules/VCS_Dir.bas

@@ -110,7 +110,7 @@ Function RecursiveMkDir(ByVal PathSpec As String) As EMakeDirStatus
     On Error Resume Next
     err.Clear
     S = dir(PathSpec, vbNormal)
-    If err.number <> 0 Then
+    If err.Number <> 0 Then
         RecursiveMkDir = ErrInvalidCharactersInPath
         Exit Function
     End If
@@ -170,7 +170,7 @@ Function RecursiveMkDir(ByVal PathSpec As String) As EMakeDirStatus
             On Error Resume Next
             err.Clear
             FSO.CreateFolder (DirSpec)
-            If err.number <> 0 Then
+            If err.Number <> 0 Then
                 RecursiveMkDir = ErrDirectoryCreateError
                 Exit Function
             End If

+ 6 - 12
source/modules/VCS_ImportExport.bas

@@ -77,7 +77,7 @@ Public Sub ExportAllSource()
     
     logger "ExportAllSource", "DEBUG", "Save project"
     
-    CurrentProject.Application.RunCommand acCmdSave
+    SaveProject
     
     Set Db = CurrentDb
 
@@ -312,13 +312,7 @@ next_td:
     Next
     
     logger "ExportAllSource", "INFO", "> " & obj_count & " relations exported"
-    
-    '### 13/10/2016: add optimizer
-    ' cleans the obsolete files (see CleanDirs in optimizer)
-    If optimizer_activated() Then
-        Call CleanDirs
-    End If
-    '###
+
     
     logger "ExportAllSource", "INFO", "Export done"
 End Sub
@@ -530,7 +524,7 @@ End Sub
 Public Sub ImportProject()
 On Error GoTo errorHandler
 
-    If MsgBox("This action will delete all existing: " & vbCrLf & _
+    If OA_MsgBox("This action will delete all existing: " & vbCrLf & _
               vbCrLf & _
               Chr$(149) & " Tables" & vbCrLf & _
               Chr$(149) & " Forms" & vbCrLf & _
@@ -611,7 +605,7 @@ On Error GoTo errorHandler
     Exit Sub
 
 errorHandler:
-    Debug.Print "VCS_ImportExport.ImportProject: Error #" & err.number & vbCrLf & _
+    Debug.Print "VCS_ImportExport.ImportProject: Error #" & err.Number & vbCrLf & _
                 err.Description
 End Sub
 
@@ -651,7 +645,7 @@ Private Sub CloseFormsReports()
     Exit Sub
 
 errorHandler:
-    logger "CloseFormsReports", "CRITICAL", "Error #" & err.number & err.Description
+    logger "CloseFormsReports", "CRITICAL", "Error #" & err.Number & err.Description
 End Sub
 
 
@@ -684,7 +678,7 @@ Public Function InCollection(col As Collection, Optional vItem, Optional vKey) A
         col.item vKey
 
         '5 if not in collection, it is 91 if no collection exists
-        If err.number <> 5 And err.number <> 91 Then
+        If err.Number <> 5 And err.Number <> 91 Then
             InCollection = True
         End If
     ElseIf Not IsMissing(vItem) Then

+ 1 - 1
source/modules/VCS_Reference.bas

@@ -51,7 +51,7 @@ On Error GoTo 0
     Exit Function
     
 failed_guid:
-    If err.number = 32813 Then
+    If err.Number = 32813 Then
         'The reference is already present in the access project - so we can ignore the error
         Resume Next
     Else

+ 35 - 6
source/modules/VCS_Table.bas

@@ -326,7 +326,7 @@ Private Function TableExists(ByVal TName As String) As Boolean
      
      ' See if the name is in the Tables collection.
     test = Db.TableDefs(TName).name
-    If err.number <> NAME_NOT_IN_COLLECTION Then Found = True
+    If err.Number <> NAME_NOT_IN_COLLECTION Then Found = True
     
     ' Reset the error variable.
     err = 0
@@ -357,9 +357,14 @@ Private Function TableExportSql(ByVal tbl_name As String) As String
     count = 0
     For Each fieldObj In rs.Fields
         DoEvents
-        If count > 0 Then VCS_String.Sb_Append sb, ", "
-        VCS_String.Sb_Append sb, "[" & fieldObj.name & "]"
-        count = count + 1
+        If fieldObj.Type <> 109 And _
+           fieldObj.Type <> 101 And _
+           fieldObj.Type <> 11 Then   'ignore muliple choices fields, ole, and attached fields
+           
+            If count > 0 Then VCS_String.Sb_Append sb, ", "
+            VCS_String.Sb_Append sb, "[" & fieldObj.name & "]"
+            count = count + 1
+        End If
     Next
 
     TableExportSql = VCS_String.Sb_Get(sb)
@@ -367,6 +372,7 @@ End Function
 
 ' Export the lookup table `tblName` to `source\tables`.
 Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
+On Error GoTo err
     Dim FSO As Object
     Dim OutFile As Object
     Dim rs As DAO.Recordset ' DAO.Recordset
@@ -378,7 +384,7 @@ Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
         logger "ExportTableData", "ERROR", "Table " & tbl_name & " missing"
         Exit Sub
     End If
-    
+
     Set rs = CurrentDb.OpenRecordset(TableExportSql(tbl_name))
     If rs.RecordCount = 0 Then
         'why is this an error? Debug.Print "Error: Table " & tbl_name & "  empty"
@@ -413,15 +419,18 @@ Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
             If IsNull(value) Then
                 value = vbNullString
             Else
+                On Error GoTo errData
                 value = Replace(value, "\", "\\")
                 value = Replace(value, vbCrLf, "\n")
                 value = Replace(value, vbCr, "\n")
                 value = Replace(value, vbLf, "\n")
                 value = Replace(value, vbTab, "\t")
+                On Error GoTo err
             End If
             OutFile.Write value
         Next
         OutFile.Write vbCrLf
+next_field:
         rs.MoveNext
     Loop
     rs.Close
@@ -432,8 +441,17 @@ Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
     VCS_File.ConvertUcs2Utf8 tempFileName, Path
     logger "ExportTableData", "DEBUG", "Data from '" & tbl_name & "' exported to " & Path
     FSO.DeleteFile tempFileName
+    
+    Exit Sub
+err:
+    logger "ExportTableData", "ERROR", err.Description
+    Exit Sub
+errData:
+    logger "ExportTableData", "ERROR", "[" & fieldObj.name & "] field > Uneadable data"
+    Resume next_field
 End Sub
 
+
 ' Kill Table if Exists
 Private Sub KillTable(ByVal tblName As String, Db As Object)
     If TableExists(tblName) Then
@@ -600,7 +618,7 @@ Public Sub ImportTableDef(ByVal tblName As String, ByVal directory As String)
     'InFile.Close
     
     If Len(strMsg) > 0 Then
-        MsgBox strMsg, vbOKOnly, "Correct manually"
+        OA_MsgBox strMsg, vbOKOnly, "Correct manually"
         logger "ImportTableDef", "ERROR", strMsg & " - Correct manually"
     Else
         logger "ImportTableData", "DEBUG", "TableDef '" & tblName & "' imported from " & filepath
@@ -610,6 +628,7 @@ End Sub
 
 ' Import the lookup table `tblName` from `source\tables`.
 Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
+    'On Error GoTo err
     Dim Db As Object ' DAO.Database
     Dim rs As Object ' DAO.Recordset
     Dim fieldObj As Object ' DAO.Field
@@ -624,6 +643,7 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
     tempFileName = VCS_File.TempFile()
     
     Path = obj_path & tblName & ".txt"
+    
     VCS_File.ConvertUtf8Ucs2 Path, tempFileName
     
     ' open file for reading with Create=False, Unicode=True (USC-2 Little Endian format)
@@ -633,6 +653,7 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
     Db.execute "DELETE FROM [" & tblName & "]"
     Set rs = Db.OpenRecordset(tblName)
     buf = InFile.readline()
+    
     Do Until InFile.AtEndOfStream
         buf = InFile.readline()
         If Len(Trim$(buf)) > 0 Then
@@ -640,6 +661,7 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
             c = 0
             rs.AddNew
             For Each fieldObj In rs.Fields
+                On Error GoTo errField
                 DoEvents
                 value = Values(c)
                 If Len(value) = 0 Then
@@ -653,6 +675,7 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
                 If fieldObj.Type = dbBoolean Then value = CBool(value)
                 '**
                 rs(fieldObj.name) = value
+                On Error GoTo err
                 c = c + 1
             Next
             rs.update
@@ -665,4 +688,10 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
     logger "ImportTableData", "DEBUG", "Table data '" & tblName & "' imported from " & Path
 
     FSO.DeleteFile tempFileName
+    Exit Sub
+err:
+    logger "ImportTableData", "ERROR", "Table data '" & tblName & "' : Unable to import"
+    Exit Sub
+errField:
+    logger "ImportTableData", "ERROR", fieldObj.name & " > this field can not be updated"
 End Sub

+ 1 - 1
source/tables/USysOpenAccess.txt

@@ -1,3 +1,3 @@
 key	val
 include_tables	USysOpenAccess,USysRegInfo
-sources_date	10/11/2016 11:41:06
+sources_date	

+ 27 - 1
tests/readme.md

@@ -1,5 +1,31 @@
 # TESTS OPENACCESS
 
+## Notes sur l'utilisation des tests
+
+#### Si le projet de test project0.accdb est modifié
+
+Il faut penser:
+
+* à mettre à jour les sources dans .\reference\source
+* à supprimer de ces sources \macros\test_import.bas, \macros\test_export.bas, \modules\test_methods.bas
+
+#### Utiliser avec Jenkins
+
+* Lancer Jenkins
+* Créer un projet 'freestyle'
+* Configurer le projet (nom, description, repo git...)
+* Ajouter une étape au build: lancer une commande batch
+* Y copier le contenu du fichier `run_tests.bat`
+
+
+POUR LE PREMIER LANCEMENT ou EN CAS DE PROBLEME lors de l'éxecution des macros access (timeout, stuck):
+
+* accéder à la liste des services Windows de la machine depuis laquelle Jenkins est lancé
+* Accéder aux propriétés du service Jenkins, onglet Logon
+* Cocher: "interagir avec le bureau"
+
+Au premier lancement, il faudra modifier les paramètres de sécurité de Office sur la session System de cette machine (Access, Options, Confidentialité, toujours autoriser les macros, activex, écxecution des données)
+
 ## Fonctionnement des tests
 
 ### Répertoires
@@ -63,7 +89,7 @@ Le répertoire `.\work\source` est créé
 
 * Le dossier `.\work\source` est copié vers `.\results\source_1`
 
-> `xcopy .\works\source .\results\source1`
+> `robocopy /e .\works\source .\results\source1`
 
 #### Contrôle des résultats
 

+ 1 - 1
tests/run_tests.bat

@@ -31,7 +31,7 @@ del .\work\source\macros\test_export.bas
 del .\work\source\macros\test_import.bas
 
 echo copy source to results
-xcopy .\works\source .\results\source1
+robocopycopy /e /NFL /NDL /NJH /nc /ns /np .\works\source .\results\source1
 
 echo control the result
 python compare.py .\results\source1 .\reference\source